| 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 slow | Jerry Schwartz | 3 Jan |
| • Re: This just seems to slow | mos | 3 Jan |
| • RE: This just seems to slow | Daevid Vincent | 3 Jan |
| • Re: This just seems to slow | Wagner Bianchi | 3 Jan |
| • RE: This just seems to slow | Jerry Schwartz | 3 Jan |
| • RE: This just seems to slow | Jerry Schwartz | 3 Jan |
| • Re: This just seems to slow | MySQL) | 3 Jan |
| • RE: This just seems to slow | Jerry Schwartz | 3 Jan |
| • RE: This just seems to slow | Gavin Towey | 3 Jan |
| • RE: This just seems to slow | Jerry Schwartz | 3 Jan |
| • RE: This just seems to slow | mos | 3 Jan |
| • RE: This just seems to slow | Jerry Schwartz | 4 Jan |
| • RE: This just seems to slow | mos | 4 Jan |
| • RE: This just seems to slow | Jerry Schwartz | 4 Jan |
| • mysqlimport doesn't work for me | Jerry Schwartz | 3 Jan |
| • Re: mysqlimport doesn't work for me | Carsten Pedersen | 3 Jan |
| • RE: mysqlimport doesn't work for me | Jerry Schwartz | 3 Jan |
