You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following execution info is only time:532.1µs, but it acturally has a long lock RPC time, which makes the user confused. It has the similar issue in slow query logs.
Query OK, 0 rows affected (0.00 sec)
mysql> insert into t values (1) on duplicate key update i = i + 1;
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
mysql> select tidb_decode_plan('rALQMAkyN18xCTAJMAlOL0EJMAl0aW1lOjUzMi4xwrVzLCBsb29wczoxLCBwcmVwYXJlOiAyN8IBGVBjaGVja19pbnNlcnQ6IHt0b3RhbF8FPQwgNTA1BTwIbWVtDSENGRAzNjQuOAUbOHByZWZldGNoOiAxNDAuMwUUSHJwYzp7QmF0Y2hHZXQ6e251bV8BEwgyLCAdXQQ3OAUuCH19fQGcJGNrX2tleXM6IHsFeig1MHMsIHJlZ2lvbgGzBRsAMwESPHNvbHZlX2xvY2s6Ni42MW0F2QRjawVgLDQ5Ljk5NTM0MDk5NQE/ZHBjX2NvdW50OjUwfQk3MiBCeXRlcwlOL0EK');
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_decode_plan('rALQMAkyN18xCTAJMAlOL0EJMAl0aW1lOjUzMi4xwrVzLCBsb29wczoxLCBwcmVwYXJlOiAyN8IBGVBjaGVja19pbnNlcnQ6IHt0b3RhbF8FPQwgNTA1BTwIbWVtDSENGRAzNjQuOAUbOHByZWZldGNoOiAxNDAuMwUUSHJwYzp7QmF0Y2hHZXQ6e251bV8BEwgyLCAdXQQ3OAUuCH19fQGcJGNrX2tleXM6IHsFeig1MH |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id task estRows operator info actRows execution info memory disk
Insert_1 root 0 N/A 0 time:532.1µs, loops:1, prepare: 27µs, check_insert: {total_time: 505µs, mem_insert_time: 364.8µs, prefetch: 140.3µs, rpc:{BatchGet:{num_rpc:2, total_time:78.3µs}}}, lock_keys: {time:50s, region:1, keys:3, resolve_lock:6.61ms, lock_rpc:49.995340995s, rpc_count:50} 72 Bytes N/A |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Enhancement
The following execution info is only
time:532.1µs
, but it acturally has a long lock RPC time, which makes the user confused. It has the similar issue in slow query logs.The text was updated successfully, but these errors were encountered: