MySQL Forums
Forum List  »  General

Re: Slow Inserts
Posted by: Vince Gatto
Date: October 03, 2008 10:12AM

This approach is similar to what I'm using right now. If your staging table has indexes, building those indexes could be slowing you down. Since you'll likely be doing a table scan during your insert select, indexes probably won't be of much help. If you do need indexes on your staging table, make sure that you've already sorted the data before insert. You might also try dumping the data to file and loading using LOAD DATA INFILE. Also, simple UNIX tools like sort and uniq can outperform MySQL in some scenarios, so if you're going to dump to disk, you can sort the data and remove duplicates before you load it into MySQL.

Options: ReplyQuote


Subject
Written By
Posted
October 03, 2008 09:03AM
Re: Slow Inserts
October 03, 2008 10:12AM
March 27, 2009 08:25AM
March 27, 2009 09:35PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.