v.23.12Improvement
sleep() Function Can Now Be Cancelled with KILL QUERY
sleep()function now can be cancelled withKILL QUERY. #57746 (Vitaly Baranov).
Why it matters
This feature allows users to interrupt and stop queries that are currently sleeping via thesleep() function, improving control over long-running or unwanted queries and preventing unnecessary resource usage.How to use it
To cancel a sleeping query, execute theKILL 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.