List:General Discussion« Previous MessageNext Message »
From:Shawn Green (MySQL) Date:January 3 2011 3:51pm
Subject:Re: This just seems to slow
View as plain text  
On 1/3/2011 10:41, Jerry Schwartz wrote:
>> -----Original Message-----
>> From: Daevid Vincent [mailto:daevid@stripped]
>> Sent: Sunday, January 02, 2011 11:49 PM
>> ...
>
>> Also delete your INDEX / KEYs and add them at the very end instead.
>>
> [JS] Wouldn't it take as long to build the indices? I guess it probably
> wouldn't.
>

It will not. MySQL does not "grow" or "edit" its index files 
incrementally, it computes a fresh on-disk index image for every change.

Right now, you are doing a complete index rebuild for every row you add. 
If you add up the total work you are saving (index 121000 rows, index 
121001 rows, index 121002 rows,...) then you can see a big improvement 
by waiting to put the indexes on the table at the very end of the process.

http://dev.mysql.com/doc/refman/5.0/en/insert-speed.html

Yours,
-- 
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc.
Office: Blountville, TN
Thread
This just seems to slowJerry Schwartz3 Jan
  • Re: This just seems to slowmos3 Jan
    • RE: This just seems to slowDaevid Vincent3 Jan
      • Re: This just seems to slowWagner Bianchi3 Jan
        • RE: This just seems to slowJerry Schwartz3 Jan
      • RE: This just seems to slowJerry Schwartz3 Jan
        • Re: This just seems to slowMySQL)3 Jan
    • RE: This just seems to slowJerry Schwartz3 Jan
      • RE: This just seems to slowGavin Towey3 Jan
        • RE: This just seems to slowJerry Schwartz3 Jan
      • RE: This just seems to slowmos3 Jan
        • RE: This just seems to slowJerry Schwartz4 Jan
          • RE: This just seems to slowmos4 Jan
            • RE: This just seems to slowJerry Schwartz4 Jan
  • mysqlimport doesn't work for meJerry Schwartz3 Jan
    • Re: mysqlimport doesn't work for meCarsten Pedersen3 Jan
      • RE: mysqlimport doesn't work for meJerry Schwartz3 Jan