Skip to content

Commit 59a2f82

Browse files
authoredOct 16, 2024
resource_control: add repeats to tidb_runaway_queries (pingcap#18909)
1 parent 460be92 commit 59a2f82

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed
 

‎tidb-resource-control.md

+14-10
Original file line numberDiff line numberDiff line change
@@ -399,19 +399,23 @@ You can get more information about runaway queries from the following system tab
399399
MySQL [(none)]> SELECT * FROM mysql.tidb_runaway_queries LIMIT 1\G
400400
*************************** 1. row ***************************
401401
resource_group_name: default
402-
time: 2024-09-06 17:43:09
403-
match_type: identify
404-
action: kill
405-
original_sql: select * from sbtest.sbtest1
406-
plan_digest: cef718bcf4137307a8167e595941a92a260deb7dd9e1c9735bfba3ce3542de0f
407-
tidb_server: 127.0.0.1:4000
408-
rule: RequestUnit = RRU:10.838106, WRU:0.000000, WaitDuration:0s(10)
402+
start_time: 2024-09-09 17:43:42
403+
repeats: 2
404+
match_type: watch
405+
action: kill
406+
sample_sql: select sleep(2) from t
407+
sql_digest: 4adbc838b86c573265d4b39a3979d0a362b5f0336c91c26930c83ab187701a55
408+
plan_digest: 5d094f78efbce44b2923733b74e1d09233cb446318293492901c5e5d92e27dbc
409+
tidb_server: 127.0.0.1:4000
409410
```
410411
411-
In the preceding output,`match_type` indicates how the runaway query is identified. The value can be one of the following:
412+
Field description:
412413
413-
- `identify` means that it matches the condition of the runaway query.
414-
- `watch` means that it matches the quick identification rule in the watch list.
414+
- `start_time` indicates the time when the runaway query is identified.
415+
- `repeats` indicates the number of times the runaway query has been identified since `start_time`.
416+
- `match_type` indicates how the runaway query is identified. The value can be one of the following:
417+
- `identify` means that it matches the condition of the runaway query.
418+
- `watch` means that it matches the quick identification rule in the watch list.
415419
416420
+ The `information_schema.runaway_watches` table contains records of quick identification rules for runaway queries. For more information, see [`RUNAWAY_WATCHES`](/information-schema/information-schema-runaway-watches.md).
417421

0 commit comments

Comments
 (0)
Please sign in to comment.