How do I import MySQL faster?

We need to dump existing production data and then import it into the development database for the final rounds of testing.

In pseudo-commands, we currently:

mysqldump ....
mysql -u __USER__ __DB__ < ./dbdump.sql
mysql "sanitize script"

The problem is that the middle team imports and takes more than an hour to import 600 MB of data. Perhaps this is because of all the indexes that we have, but it strikes me that this is the only real import method.

Is there a way to get direct storage data, not an SQL dump, and then just replace my local SQl data? It seems crazy to upload all the data into SQL commands and then execute these commands.

+3
source share
1 answer

myisam, . " ".

"load_data_infile". mysql, 20 , insert. . http://dev.mysql.com/doc/refman/5.0/en/insert-speed.html

+2

Source: https://habr.com/ru/post/1767251/


All Articles