List:General Discussion« Previous MessageNext Message »
From:Baron Schwartz Date:May 20 2007 4:07pm
Subject:Re: speedup mysql restore
View as plain text  
Vitaliy Okulov wrote:
 > > How i can speedup restore of mysql DB from file created by mysqldump?
> [snip]
> Ok, but for innodb?
> 

1) Disable foreign key checks: SET FOREIGN_KEY_CHECKS=0 (remember to re-enable 
afterwards).  Disable unique checks too: SET UNIQUE_CHECKS=0

2) Insert the rows in primary key order.

3) Make sure your buffer pool is set as large as possible.

I can't think of anything else at the moment, though there may be some other 
things you can do.  The foreign key and unique checks are probably done for you 
already; look at the output of mysqldump.

Otherwise, try to make sure the restore is the only thing happening in the 
database, or even try to ensure the entire machine is not being used for 
anything else.

Baron
Thread
speedup mysql restoreVitaliy Okulov20 May
  • Re: speedup mysql restoreMogens Melander20 May
    • Re[2]: speedup mysql restoreVitaliy Okulov20 May
      • Re: speedup mysql restoreBaron Schwartz20 May
      • Re: Re[2]: speedup mysql restoreMogens Melander20 May
  • Re: speedup mysql restoremos21 May
Re: speedup mysql restoreRay Cauchi21 May
Re: speedup mysql restoreEric Bergen21 May