group. Within the group, the leader is responsible for acquiring locks, while the remaining followers can execute hotspot updates without waiting for lock release. Other statements within the transaction can execute concurrently with other transactions. This mechanism significantly improves the parallelism of hotspot row updates, delivering particularly notable results in high-transaction-latency scenarios such as semi-sync replication and high network latency.group, thereby improving parallelism.Concurrent Transactions ──▶ Group 1 ──▶ Group 2 ──▶ Group 3 ──▶ ...│ │Leader LeaderFollower×N Follower×N
Role | Action |
leader | Responsible for locking and unlocking hotspot rows, releasing locks and waking up the next leader when the transaction ends. |
follower | Does not need to wait for lock release, can be executed after the leader completes the hotspot row update, and other statements within the transaction are executed concurrently with other transactions. |
group. The first transaction that enters becomes the leader, and the rest serve as followers.leader acquires the lock and performs the hotspot row update.leader immediately grants the next follower permission to execute, without waiting for the leader to commit.follower re-reads the latest current data and directly performs the hotspot row update (skipping the lock acquisition step).leader releases the row lock when the transaction ends, awakens the next leader, and a new group is formed accordingly.followers within a group no longer wait for the leader to commit, the lock waiting time for transactions is significantly reduced, and the improvement effect is particularly pronounced in high-latency scenarios.group must be committed sequentially according to the order of hotspot row updates, ensuring MVCC (Multi-Version Concurrency Control) data visibility and correctness.group needs to be rolled back, all its subsequently executed transactions must be rolled back in reverse order.
Number Of Concurrent Threads | Hotspot Update Disabled | Hotspot Update Enabled | Speedup Ratio |
8 | 671.15 | 668.64 | 1.0× |
32 | 660.69 | 6,927.31 | 10.5× |
128 | 635.14 | 15,304.53 | 24.1× |
512 | 594.28 | 13,709.24 | 23.1× |
1024 | 551.57 | 12,936.15 | 23.5× |

Number of Concurrent Threads | Hotspot Update Disabled | Hotspot Update Enabled | Latency Reduction |
8 | 12.08 | 12.08 | 1.0× |
32 | 49.21 | 5.18 | 9.5× |
128 | 204.11 | 9.56 | 21.4× |
512 | 877.61 | 37.56 | 23.4× |
1024 | 1903.57 | 77.19 | 24.7× |
Parameter Name | Default Value | Description |
innodb_hot_update_detect | OFF | Whether to enable hotspot update detection. After it is enabled, the system automatically identifies hotspot rows and triggers merge optimization. |
innodb_hot_update_threshold | 30 | The concurrency threshold for triggering hotspot update merge optimization. The hotspot update mechanism is triggered when the number of concurrent updates to the same row exceeds this threshold. |
Item | Description |
Only supports single-row updates via primary key index. | Both SELECT FOR UPDATE and UPDATE must be performed as single-row operations based on the primary key index, and the update conditions must be consistent. If SELECT FOR UPDATE acquires a lock on a secondary index, the hotspot optimization fails to take effect. |
SELECT FOR UPDATE must be executed before UPDATE. | If a transaction contains both SELECT FOR UPDATE and UPDATE operations on a hotspot row, SELECT FOR UPDATE must be executed first. When UPDATE arrives, if it has already been queued, it skips the queue and is executed directly. |
Multiple UPDATE operations on the same hotspot row are not allowed within a single transaction. | After the first UPDATE is completed, the lock is released to the next transaction. If the same row is UPDATE again, the commit order will be disrupted, and the system will report an error and roll back the entire transaction. |
Conflicting SQL statements are not allowed after a hotspot row UPDATE. | After a transaction updates a hotspot row, subsequent statements must not cause lock conflicts with other hotspot update transactions; otherwise, an error is reported and the entire transaction is rolled back. |
Deleting hotspot records is not allowed during hotspot updates. | If a DELETE request attempts to operate on a record that is being updated as a hotspot, an error is reported and the entire transaction is rolled back. |
Updating hotspot records via secondary indexes is not allowed during hotspot updates. | If a record that is being updated as a hotspot is updated via a secondary index, an error is reported and the entire transaction is rolled back. |
Thread pool mode is not currently supported. | On instances where the thread pool (Thread Pool) is enabled, the hotspot update feature is temporarily unavailable. |
SHOW VARIABLES LIKE 'innodb_hot_update%';
BEGIN;UPDATE account SET balance = balance - 100 WHERE id = 1; -- Hotspot row, single-row update based on the primary key-- Other non-conflicting business logic...COMMIT;
BEGIN;SELECT * FROM account WHERE id = 1 FOR UPDATE; -- Based on the primary key, it goes to the hotspot waiting queue.INSERT INTO account_log (account_id, amount, op_time) VALUES (1, -100, NOW()); -- Record the operation logUPDATE account SET balance = balance - 100 WHERE id = 1; -- Hotspot row UPDATE, which triggers granting to the next followerCOMMIT;
SELECT FOR UPDATE and UPDATE WHERE conditions must be consistent and must both be single-row operations based on the primary key.select * from information_schema.INNODB_HOT_ROW_UPDATE_STATS command, observing hotspot row-related statistics from monitoring metrics, or noting a significant improvement in TPS/latency metrics.KILL the related transactions.group". However, if high latency is encountered, you can appropriately adjust the innodb_hot_update_wakeup_timeout parameter.Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback