Bug #8926 Load Data Infile speed is crippled
Submitted: 3 Mar 2005 16:00 Modified: 3 Jul 2013 5:39
Reporter: Mike MySQLAB Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S4 (Feature request)
Version:4.1.1 OS:Windows (Win XP)
Assigned to: CPU Architecture:Any

[3 Mar 2005 16:00] Mike MySQLAB
Description:
Loading tens (or hundreds) of millions of rows of data into a table with Load Data Infile is crippled because to rebuild the keys it resorts to using "Repair with keycache" instead of "repair by sorting". The difference is it now takes days to rebuild the index instead of hours.

How to repeat:
Create a large CSV file with 400 million rows and then use Load Data Infile to load it into an empty table. The data gets loaded rather quickly but it can take 10x-50x longer to rebuild the keys.

Suggested fix:
I would like to see an additional parameter added to Load Data Infile syntax called "BySort" or "ByKeyCache" to explicitly tell it how to rebuild the keys. This will give the developer much more control over how the keys are rebuilt.

As it stands, waiting days for the keys to be rebuilt is unacceptable.
[3 Jul 2013 5:39] MySQL Verification Team
duplicate of http://bugs.mysql.com/bug.php?id=35620