title | summary |
---|---|
QUERY WATCH |
An overview of the usage of QUERY WATCH for the TiDB database. |
The QUERY WATCH
statement is used to manually manage the watch list of runaway queries in a resource group.
Note:
This feature is not available on TiDB Serverless clusters.
AddQueryWatchStmt ::=
"QUERY" "WATCH" "ADD" QueryWatchOptionList
QueryWatchOptionList ::=
QueryWatchOption
| QueryWatchOptionList QueryWatchOption
| QueryWatchOptionList ',' QueryWatchOption
QueryWatchOption ::=
"RESOURCE" "GROUP" ResourceGroupName
| "RESOURCE" "GROUP" UserVariable
| "ACTION" EqOpt ResourceGroupRunawayActionOption
| QueryWatchTextOption
ResourceGroupName ::=
Identifier
| "DEFAULT"
QueryWatchTextOption ::=
"SQL" "DIGEST" SimpleExpr
| "PLAN" "DIGEST" SimpleExpr
| "SQL" "TEXT" ResourceGroupRunawayWatchOption "TO" SimpleExpr
ResourceGroupRunawayWatchOption ::=
"EXACT"
| "SIMILAR"
| "PLAN"
DropQueryWatchStmt ::=
"QUERY" "WATCH" "REMOVE" NUM
This statement is a TiDB extension to MySQL syntax.