mysql innodb max size of transaction
Using mysql 5.1.41 and innodb
I'm doing some data import, b开发者_JAVA技巧ut can't use load data infile, so I'm manually issuing insert statements. I found that it's much faster to disable auto commit and issue say, 100 insert statements and then commit, instead of the implicit commit after each insert.
It got me thinking, what limits are there to how much data I can put into a transaction? Is there a limit on the number of statements, or does it have to do with the size in bytes etc...?
for innodb the transaction is only limited by the the redo-log-size - so if you commit very large transactions make sure you set innodb_log_file_size=256M (or more). note that in case of a crash, the drawback will take some time...
精彩评论