InnoDB takes over an hour to import 600MB file, MyISAM in a few minutes

前端 未结 4 1407
孤城傲影
孤城傲影 2020-12-12 09:55

I\'m currently working on creating an environment to test performance of an app; I\'m testing with MySQL and InnoDB to find out which can serve us best. Within this environm

4条回答
  •  天涯浪人
    2020-12-12 10:26

    I had issues doing a lot of bulk importing and recommend the accepted answer. I found you can also speed things up significantly by:

    1. Dropping all indexes (other than primary key), loading the data then re-adding indexes
    2. Checking your innodb_log_file_size * innodb_log_files_in_group is sufficient to avoid writing to disk in sub-second frequency

    Regarding #2 the defaults of 5M * 2 will not be enough on a modern system. For details see innodb_log_file_size and innodb_log_files_in_group

提交回复
热议问题