I get large data transfers periodically that I used to completely replace the contents of a MySQL table. Each time I do this, I truncate the table, disable keys, add several million rows of data, and then enable keys. As expected, once I enable keys, there is a lengthy delay while the table is being reindexed. The table has several active indices and it takes about 30 minutes to complete.
Unfortunately, I can't figure out how to get status messages that would give me progress updates on how the operation is proceeding. I found an old thread from 2001 on the MySQL forum that basically says you can't get progress updates.
I was hoping that was no longer the case. I am running MySQL Server 5.5 and MySQL Workbench 5.2, both community editions. Perhaps there's something I can do with workbench?
Side question: Currently, I do my updates from a Windows program that sequentially parses the transfer data file into SQL INSERT statements that I immediately dispatch to the MySQL client over a socket. Would it be faster to generate all the INSERT statements to a file and then do a bulk import by executing the SQL script from Workbench instead?
-- roschler
LOAD DATA INFILE
dev.mysql.com/doc/refman/5.5/en/load-data.html for speed. It's faster to do bulk inserts than individual for sure. But that won't help speed when rebuilding indices.