Import of 8GB mysql dump takes a long time

后端 未结 2 1929
孤街浪徒
孤街浪徒 2021-02-13 17:03

I\'ve got an 8GB MYSQL database dump of InnoDB tables created with mysqldump. I import the data with:

mysql -uroot -p my_db < dump.sql

An 5

2条回答
  •  我在风中等你
    2021-02-13 17:24

    How much memory does the machine have? My first guess would be the machine has 6gb or 8gb of memory, and mysql was able to keep the first dump completely in-memory but is somehow swapping hard-core on the second import. Can you run a vmstat 5 for a few iterations while doing the import and see how heavily the system is swapping?

提交回复
热议问题