Showing entries 1 to 1
Displaying posts with tag: Commit Optimization (reset)
Commit Optimization for Large MySQL Transactions

This article is also available in Chinese: 中文版. Browse all English articles.

If you use and operate MySQL, you’ve surely run into a strange slow query like this:

  • An INSERT that’s normally instant took 1.3s, and the slow-query log shows no long lock wait.
  • Every statement in a multi-statement transaction had already finished, yet the COMMIT alone took 1.3s.

When this happens, the most likely cause is a large transaction committing. Below is a simulated test: we used sysbench to simulate a normal workload, then ran a large UPDATE in the background every 5 seconds. You can see the large UPDATE severely hurts performance.

Root Cause

The …

[Read more]
Showing entries 1 to 1