Thursday, April 7, 2016

MySQL Import Wizard vs LOAD INFILE

The MySQL workbench has a handy tool to import CSV files:

image

image

Unfortunately it is extremely slow. Here are some timing figures when compared with the LOAD INFILE command.

image

Timings are in seconds. Extrapolating this, it would take about 22 hours to import my 1.7 million record CSV file using the Import Wizard. I suspect this method will commit after every row, which is often a performance killer. So better use the LOAD INFILE command:

image

PS. Be aware that using the import wizard, the cancel button does not work during the import:

image

No comments:

Post a Comment