Friday, April 15, 2011

Mysqldump Performance Issue

When dumping really big tables, mysqldump was using up large amounts of memory, so it may cause no-response problem. To overcome this, --quick and --single-transaction options can used. Following are the sections for these options in the mysqldump man page.

--quick, -q
This option is useful for dumping large tables. It forces mysqldump to retrieve rows for a table from the server a row at a time rather than retrieving the entire row set and buffering it in memory before writing it out.

--single-transaction
To dump big tables, you should combine this option with --quick.

No comments: