Mysql – regarding transaction commit in thesql

MySQL

My server configuration has auto_commit = off which helps in large transaction while inserting and updating but what if innodb_autoinc_lock_mode = 1 as my tables does not have primary key with auto_increment? will it help in faster results or do we need to make to 2? is there any way to help it?

Best Answer

Beyond some point, waiting too long to COMMIT slows things down. Think of it as having to save more and more "undo" stuff.

innodb_autoinc_lock_mode only applies to AUTO_INCREMENT.

It seems that your real question is about high speed ingestion. Are you INSERTing one row at a time? You can get 10x speedup if you insert 100 at a time. That is, a single INSERT with 100 rows. Are you inserting from multiple connections? Etc. Here's one discussion on high speed ingestion.