Skip to content

resouce control: add desp about QUERY WATCH REMOVE RESOURCE GROUP #21277

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
10 changes: 9 additions & 1 deletion tidb-resource-control-runaway-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ There are three methods for `WATCH` to match for quick identification:

The `DURATION` option in `WATCH` indicates the duration of the identification item, which is infinite by default.

After a watch item is added, neither the matching feature nor the `ACTION` is changed or deleted whenever the `QUERY_LIMIT` configuration is changed or deleted. You can use `QUERY WATCH REMOVE` to remove a watch item.
After a watch item is added, neither the matching feature nor the `ACTION` is changed or deleted whenever the `QUERY_LIMIT` configuration is changed or deleted.

You can use `QUERY WATCH REMOVE` to remove a watch item, or use `QUERY WATCH REMOVE RESOURCE GROUP` to remove all watch items of a specific resource group in a batch.

The parameters of `QUERY_LIMIT` are as follows:

Expand Down Expand Up @@ -134,6 +136,12 @@ The parameters are as follows:
QUERY WATCH REMOVE 1;
```

- Remove all watch items of a specific resource group:

```sql
QUERY WATCH REMOVE RESOURCE GROUP rg1;
```

## Observability

You can get more information about runaway queries from the following system tables and `INFORMATION_SCHEMA`:
Expand Down