Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource_control: add repeats to tidb_runaway_queries #18909

Merged
merged 6 commits into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions tidb-resource-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,19 +399,23 @@ You can get more information about runaway queries from the following system tab
MySQL [(none)]> SELECT * FROM mysql.tidb_runaway_queries LIMIT 1\G
*************************** 1. row ***************************
resource_group_name: default
time: 2024-09-06 17:43:09
match_type: identify
action: kill
original_sql: select * from sbtest.sbtest1
plan_digest: cef718bcf4137307a8167e595941a92a260deb7dd9e1c9735bfba3ce3542de0f
tidb_server: 127.0.0.1:4000
rule: RequestUnit = RRU:10.838106, WRU:0.000000, WaitDuration:0s(10)
start_time: 2024-09-09 17:43:42
repeats: 2
match_type: watch
action: kill
sample_sql: select sleep(2) from t
sql_digest: 4adbc838b86c573265d4b39a3979d0a362b5f0336c91c26930c83ab187701a55
plan_digest: 5d094f78efbce44b2923733b74e1d09233cb446318293492901c5e5d92e27dbc
tidb_server: 127.0.0.1:4000
```

In the preceding output,`match_type` indicates how the runaway query is identified. The value can be one of the following:
Field description:

- `identify` means that it matches the condition of the runaway query.
- `watch` means that it matches the quick identification rule in the watch list.
- `start_time` indicates the time when the runaway query is identified.
- `repeats` indicates the number of times the runaway query has been identified since `start_time`.
- `match_type` indicates how the runaway query is identified. The value can be one of the following:
- `identify` means that it matches the condition of the runaway query.
- `watch` means that it matches the quick identification rule in the watch list.

+ 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).

Expand Down
Loading