Skip to main content

KILL

Forcibly terminates the currently running queries.

See also: SHOW PROCESSLIST

Syntax

KILL QUERY|CONNECTION <session_id>

Examples

SHOW PROCESSLIST;
+--------------------------------------+-------+-----------------+------+-------+----------+--------------------------------------------------------------------------------------+--------------+------------------------+-------------------------+-------------------------+--------------------------+
| id | type | host | user | state | database | extra_info | memory_usage | dal_metrics_read_bytes | dal_metrics_write_bytes | scan_progress_read_rows | scan_progress_read_bytes |
+--------------------------------------+-------+-----------------+------+-------+----------+--------------------------------------------------------------------------------------+--------------+------------------------+-------------------------+-------------------------+--------------------------+
| e04dd121-88f4-4290-85be-2b45c6e3b011 | MySQL | 127.0.0.1:65291 | root | Query | default | SELECT sum(number) from numbers_mt(10000000000) group by number%3, number%4,number%5 | 0 | 0 | 0 | 2391200000 | 19129600000 |
| 179c99d5-1894-4d4c-a89e-4b293d404c88 | MySQL | 127.0.0.1:64597 | root | Query | default | show processlist | 0 | 0 | 0 | 0 | 0 |
+--------------------------------------+-------+-----------------+------+-------+----------+--------------------------------------------------------------------------------------+--------------+------------------------+-------------------------+-------------------------+--------------------------+

KILL QUERY 'e04dd121-88f4-4290-85be-2b45c6e3b011';
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today