KILL
Terminates a connection or a query currently being performed by threads executing within StarRocks.
tip
This operation does not require privileges.
Syntaxβ
KILL [ CONNECTION | QUERY ] { <processlist_id> | <query_id> }
Parametersβ
| Parameter | Description |
|---|---|
Modifier:
|
|
| processlist_id | The ID of the thread you want to terminate. You can get the IDs of the threads that are being executed using SHOW PROCESSLIST. |
| query_id | The ID of the query you want to terminate. You can get the IDs of the queries that are pending or being executed using SHOW RUNNING QUERIES or SHOW PROC with '/current_queries' and '/global_current_queries'. |
Examplesβ
mysql> SHOW FULL PROCESSLIST;
+------+------+---------------------+--------+---------+---------------------+------+-------+-----------------------+-----------+
| Id | User | Host | Db | Command | ConnectionStartTime | Time | State | Info | IsPending |
+------+------+---------------------+--------+---------+---------------------+------+-------+-----------------------+-----------+
| 20 | root | xxx.xx.xxx.xx:xxxxx | sr_hub | Query | 2023-01-05 16:30:19 | 0 | OK | show full processlist | false |
+------+------+---------------------+--------+---------+---------------------+------+-------+-----------------------+-----------+
1 row in set (0.01 sec)
mysql> KILL 20;
Query OK, 0 rows affected (0.00 sec)