How to Kill a Query in ClickHouse
Last updated July 25, 2026 · By the SaturnSQL team
Find the query's query_id in system.processes, then run KILL QUERY WHERE query_id = '...'. KILL is asynchronous by default; add SYNC to wait until the query has actually stopped.
Find running queries
SELECT query_id, user, elapsed, read_rows, query
FROM system.processes
ORDER BY elapsed DESC;Kill by id
KILL QUERY WHERE query_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' SYNC;You can kill by other conditions too, e.g. KILL QUERY WHERE user = 'etl_job'. Long-running mutations are cancelled separately with KILL MUTATION.
Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free