SSTS Blog

Some news and tidbits that we share

mysqldump --tab with the mysqlimport utility for multi-threaded restore

by SSTS
SSTS
Server Side Technology Solutions is a consulting firm that specializes in databa
User is currently offline
on Jul 19 in Blog 0 Comments

Recently I was trying to move a decent sized mysql database to a new server. The database was about 40GB and it was taking several hours to restore the database using the mysql client. Searching for faster options I came across an option to mysqldump that produces a fileset per table instead of one big file. Haing multiple files allows usage of mysqlimport. mysqlimport has a --use-threads option so if you are working on a host with multiple cpu's you can leverage them for a much faster import. In my case I had 80 cores at my disposal. This resulted in a 7 hour import reducing down to 37 minutes.

Commands used:

mysqldump --tab

mysqlimport --use-threads

Tags: Untagged
Hits: 6180

About the author

SSTS

Server Side Technology Solutions is a consulting firm that specializes in database design, development and support.

Comments

Please login first in order for you to submit comments