Answer the question
In order to leave comments, you need to log in
It takes a long time to dump the MYSQL database. Why?
Hello! There is a mysql database with a size of 670 mb. Installed on Ubuntu 18. There was a move to a new server and the dump began to load for a long time. Here is the view from the console https://cloud.mail.ru/public/3hPj/3neoXmPjV
Running the command Mysql -v -u root -p main_data < /tmp/dump....sql
What could be wrong? How to speed up?
Answer the question
In order to leave comments, you need to log in
Don't create indexes before adding data.
A typical database dump consists of two sections:
1. database structure
2. database data
Tables are created in the database structure: their fields and indexes.
You need to cut out the code for these indexes and add index creation to the end of the dump.
Then the dump import speed will increase by 50 times.
The type of tables also affects the speed of work - myisam works faster than innodb.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question