Search code examples
mysqlcsvimportmysql-workbench

MySQL workbench table data import wizard extremely slow


I need to import a csv file with 20 million rows and 2 columns into a database, but when I try to do this with MySQL Workbench's data import wizard it is extremely slow, probably is going to take 1 month to finish, looking at the progress bar.

There has to be some faster way to do this, I hope.


Solution

  • Always use Load Data Infile as a first attempt for huge sets of data.

    Mysql Manual page on Load Data Infile.

    Wrote up several answers for this question, but for a peer comparison, see this guy's question and my Answer and his time comparisons of Workbench vs Load Data Infile.