KILL
Description
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>
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. |
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)