v.23.12Improvement

sleep() Function Can Now Be Cancelled with KILL QUERY

sleep() function now can be cancelled with KILL QUERY. #57746 (Vitaly Baranov).
The sleep() function in ClickHouse can now be cancelled using the KILL QUERY command.

Why it matters

This feature allows users to interrupt and stop queries that are currently sleeping via the sleep() function, improving control over long-running or unwanted queries and preventing unnecessary resource usage.

How to use it

To cancel a sleeping query, execute the KILL QUERY command specifying the query ID. For example:

KILL QUERY WHERE query_id = 'your_query_id';

This will stop the query that is paused by the sleep() function.