Can somebody explain how mysqldump --single-transaction
actually works for transactional tables, like InnoDB? I've read the official documentation but still have no clue. Does it perform per table lock instead of global lock as --lock-tables
does? Also, mysqldump runs --opt
as a default option, which includes --lock-tables
, but they are mutually exclusive with --single-transaction
as described in the documentation link above. Should I use --skip-opt
when using --single-transaction
in a single mysqldump command?
I need to dump InnoDB table with size of ~700 Gb and I'm looking for the right command to achieve this. Currently I use the below one:
mysqldump -B my_db --quick --single-transaction --max-allowed-packet=512M --compress --order-by-primary
Thanks in advance.
--single-transaction
option. I just want to understand how it exectly works in details. – Lippe