I want to speed up a data loading.
I use MySQL 5.5, InnoDB and have 1M rows of data (65Mb file). It takes 5 minutes.
What mysql settings and commands affect the speed of LOAD DATA INFILE for InnoDB?
Thank you.
I want to speed up a data loading.
I use MySQL 5.5, InnoDB and have 1M rows of data (65Mb file). It takes 5 minutes.
What mysql settings and commands affect the speed of LOAD DATA INFILE for InnoDB?
Thank you.
I can recommend these settings to improve load time:
Other than settings, there are some things you can do yourself:
Try removing indexes and triggers. You can re-create them after the load. Also look into using some of the high-load settings in my-huge.cnf instead of the defaults.
Some more innodb performance settings:
http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/
Also make sure that binary logging disabled if possible.
This might not be exactly what you're looking for but is a trick I've used in the past
Hope it helps.
If you are in a hurry because you are replacing the contents of a live table, then do it this way instead:
The
RENAME
is 'instantaneous' and atomic, so you are 'never' down, regardless of table size.(Hence you don't need to worry so much about speeding up the
LOAD
.)