auto-increment locking


The convenience of an auto-increment primary key involves some tradeoff with concurrency. In the simplest case, if one transaction is inserting values into the table, any other transactions must wait to do their own inserts into that table, so that rows inserted by the first transaction receive consecutive primary key values. InnoDB includes optimizations, and the innodb-autoinc-lock-mode option, so that you can choose how to trade off between predictable sequences of auto-increment values and maximum concurrency for insert operations.

See also auto-increment.

See also concurrency.

See also innodb_autoinc_lock_mode.

Retornar