List:General Discussion« Previous MessageNext Message »
From:chandru Date:May 26 2008 9:10am
Subject:Re: running optimize/analyze command
View as plain text  
Hi anand,
  To add to alex's views, I see that you do two major operations
1. Insert

    * Use a temporary table that loads the data initially and then you
      copy the same to the original table, which can prevent load on the
      original table and shall be faster as well.
    * you can disable the indexes and then insert the records into the
      table. after the insert is over you can enable the indexes.
    * try using extended inserts and increase the bulk_insert_buffer_size.
    * In case you use load data infile use that with CONCURRENT
    * Share the I/O load by having the data written across multiple discs.


2. delete

    * Please try to use partition if you can migrate that to MySQL 5.1.x
      and partition the tables based on the delete condition.
    * Since you where mentioning that there is huge volume of data that
      needs to be deleted, check that if the max_allowed_packet value is
      set to 1GB, if the selected data volume is more than 1GB try to
      split the delete query into smaller ones

Note:  confirm that indexes are available on the where clause

Regards,
Pradeep Chandru



Alex Arul Lurthu wrote:
> Few things you can do to help already running optimize table processes :
>
> 1. Turn off competing processes.
> 2. Make sure there is no read caching on in your raid controller.
> 3. Taking the machine OOR also helps.
>
> For future optimize commands :
>
> Is your deletion process based on some date ? If so have you considered
> using Merge tables and MyISAM. If you do so, then purging becomes just
> dropping a table an running an alter table on Merge which is very fast.
>
>   


********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail & notify us 
immediately at admin@stripped
Thread
running optimize/analyze commandAnanda Kumar29 Apr
  • Re: running optimize/analyze commandSebastian Mendel29 Apr
    • Re: running optimize/analyze commandAnanda Kumar26 May
      • Re: running optimize/analyze commandAlex Arul Lurthu26 May
        • Re: running optimize/analyze commandAnanda Kumar26 May
          • Re: running optimize/analyze commandCraig Huffstetler26 May
            • Re: running optimize/analyze commandAnanda Kumar26 May
          • Re: running optimize/analyze commandAlex Arul Lurthu26 May
        • Re: running optimize/analyze commandchandru26 May
          • Re: running optimize/analyze commandAlex Arul Lurthu26 May
            • Re: running optimize/analyze commandAnanda Kumar26 May
              • Re: running optimize/analyze commandAlex Arul Lurthu26 May
                • Re: running optimize/analyze commandAnanda Kumar26 May
                  • Re: running optimize/analyze commandAlex Arul Lurthu26 May
Re: running optimize/analyze commandNagaraj S26 May
  • Re: running optimize/analyze commandchandru26 May
    • Re: running optimize/analyze commandNagaraj S27 May