From b2018ece5ebdc6a71fd023f68f12ead46a77eaba Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 30 Jun 2025 16:13:24 +0800 Subject: [PATCH 1/4] Add temp.md --- temp.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 temp.md diff --git a/temp.md b/temp.md new file mode 100644 index 0000000000000..af27ff4986a7b --- /dev/null +++ b/temp.md @@ -0,0 +1 @@ +This is a test file. \ No newline at end of file From d7fdc36f9e7675444479f11f4b5aaa251450098c Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 30 Jun 2025 16:13:29 +0800 Subject: [PATCH 2/4] Delete temp.md --- temp.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 temp.md diff --git a/temp.md b/temp.md deleted file mode 100644 index af27ff4986a7b..0000000000000 --- a/temp.md +++ /dev/null @@ -1 +0,0 @@ -This is a test file. \ No newline at end of file From 1932e62a90853a74b3cab2f3048337d3faa56b7c Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 30 Jun 2025 16:20:59 +0800 Subject: [PATCH 3/4] Update tidb-resource-control-runaway-queries.md --- tidb-resource-control-runaway-queries.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tidb-resource-control-runaway-queries.md b/tidb-resource-control-runaway-queries.md index bcf12ea11a835..454676e0e8f6e 100644 --- a/tidb-resource-control-runaway-queries.md +++ b/tidb-resource-control-runaway-queries.md @@ -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: @@ -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`: From 017872e6a04653564bb3eaeaa977c51247beff7e Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 23 Jul 2025 14:06:35 +0800 Subject: [PATCH 4/4] Apply suggestions from code review --- tidb-resource-control-runaway-queries.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tidb-resource-control-runaway-queries.md b/tidb-resource-control-runaway-queries.md index 454676e0e8f6e..901da621dd75a 100644 --- a/tidb-resource-control-runaway-queries.md +++ b/tidb-resource-control-runaway-queries.md @@ -39,7 +39,7 @@ The `DURATION` option in `WATCH` indicates the duration of the identification it 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. +You can use `QUERY WATCH REMOVE` to remove a watch item, or use `QUERY WATCH REMOVE RESOURCE GROUP` (New in v9.0.0) to remove all watch items of a specific resource group in a batch. The parameters of `QUERY_LIMIT` are as follows: @@ -136,7 +136,7 @@ The parameters are as follows: QUERY WATCH REMOVE 1; ``` -- Remove all watch items of a specific resource group: +- Remove all watch items of a specific resource group (New in v9.0.0): ```sql QUERY WATCH REMOVE RESOURCE GROUP rg1;