improve speed of mysql import

前端 未结 9 1546
無奈伤痛
無奈伤痛 2021-01-31 14:26

I have large database of 22GB. I used to take backup with mysqldump command in a gzip format.

When i extract the gz file it produces the

9条回答
  •  执笔经年
    2021-01-31 15:02

    One thing you can do is

    SET AUTOCOMMIT = 0; SET FOREIGN_KEY_CHECKS=0
    

    And you can also play with the values

    innodb_buffer_pool_size
    innodb_additional_mem_pool_size
    innodb_flush_method
    

    in my.cnf to get you going but in general you should have a look at the rest of innodb parameters as well to see what best suits you.

    This is a problem I have had in the past I don't feel I have tackled completely but I hope I had pointed myself in this direction from the get go. Would have saved myself quite some time.

提交回复
热议问题