Is it better to use (for perfomance tuning)
AUTOCOMMIT = 0 before bulk inserts of data in MySQL, if the insert query looks like
INSERT INTO SomeTable (column1, column2) VALUES (val1,val2),(val3,val4),... ?
migrated from stackoverflow.com May 21 '13 at 11:40
This question came from our site for professional and enthusiast programmers.
According to the documentation,
You have a trade-off you need to be aware of.
Granted, it is true that a log flush happens with each
Think about the redo logs (ib_logfile0,ib_logfile1) and the undo tablespace (inside ibdata1). Change information must be stored somewhere in case the INSERTs need to be rolled back or recovery is initiated after a crash.
Either way, there will be some disk I/O to contend with.
Additionally, consider innodb_log_buffer_size
These are facts. Let the buyer beware.