بالا بردن سرعت restore کردن پایگاه داده از فایل dump

This link shows what one can do to speed up restoring process.

http://dev.mysql.com/doc/refman/5.5/en/optimizing-innodb-bulk-data-loading.html

One can put put the commands at the top of the dump file

SET @[email protected]@AUTOCOMMIT, AUTOCOMMIT = 0;
SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS = 0;
SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0;

And put these statements at the end of the dump file

SET [email protected]_FOREIGN_KEY_CHECKS;
SET [email protected]_UNIQUE_CHECKS;
SET AUTOCOMMIT = @OLD_AUTOCOMMIT;

This worked for me. Happy restoring :-)

Append to the top of a large file: bash

cat headerfile myfile trailerfile > newfile

 

برچسب ها: 

افزودن نظر جدید