Import MySQL Dump Fast(er)

by kiawin


Part of software testing at times we need mock database which can be easily obtained from production database using a simple mysqldump command.

However, the import of the mysql dump into our local mysql server could painstakingly slow especially when the import file is large.

If the tables are of InnoDB, we can speed up the import like Speedy gonzales by wrapping the dump with the following SQL statements :)

SET autocommit=0;
... SQL import statements ...

Time to make your harddisk work harder! Read more at MySQL reference manual.