On 1/3/2011 10:41, Jerry Schwartz wrote:
-----Original Message-----
From: Daevid Vincent [mailto:dae...@daevid.com]
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

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to