Skip to main content
Alexander Mikhailian

Alexander Mikhailian

Faster Mysql dump and restore

It's surprising how many people do not know that their mysql dumps and restores can be faster if they disable autocommits.

Dump

mysqldump mydb --single-transaction >mydb.sql

Restore

(echo "SET autocommit=0; cat  mydb.sql; echo "COMMIT;") | mysql mydb
Tags: 
MySQL
MySQL newspeak 2FA perl linux mac business android community management management regress corporate encryption computational linguistics piracy tall ships race 2010 udp htc flemish vandalism sysml wget docker journalism security evil royal fuck-up design patterns 6910p philosophy software apache belarus gmail bricolage translation LaTeX business idea microsoft virtualization politics photosight space exploration rails netbsd EU idiots everywhere antwerp BI tcp webdesign git Word cinema gnu screen ddos bsd jobs OLAP drupalplanet sysadmin silent majority popularity struts oper.ru ESA freedom ruby software programming conferences ETL ICT data mining hall of shame configuration files cluster lexicology vocal minority science belgium metro proxy curl legal networking ipfilter mp3 omg active record SEO ukraine code snippets java statistics refactoring kiss tomcat smtp autoquotes project management adaptive delivery olpc drupal misc windows hardware copyright work debian Strategic Autonomy apple gay google dictatorship flashmob R patents bash xslt design singapore linguistics standards version control economics programming php essay russian papers