Speed up a MySQL restore from a dump file

This is a small snippet I found to speed up importing MySQL dumps, it’s is almost as fast as coping the DB files directly.

Pre INSERT

Put the commands at the top of the dump file, e.g pre.sql,

 Post INSERT

Put these statements at the end of the dump file, e.g post.sql,

Example

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *