MySQL load data infile - acceleration?

前端 未结 3 1471
陌清茗
陌清茗 2020-11-28 05:53

sometimes, I have to re-import data for a project, thus reading about 3.6 million rows into a MySQL table (currently InnoDB, but I am actually not really limited to this eng

3条回答
  •  心在旅途
    2020-11-28 06:03

    InnoDB is a pretty good engine. However, it highly relies on being 'tuned'. One thing is that if your inserts are not in the order of increasing primary keys, innoDB can take a bit longer than MyISAM. This can easily be overcome by setting a higher innodb_buffer_pool_size. My suggestion is to set it at 60-70% of your total RAM on a dedicated MySQL machine.

提交回复
热议问题