KILL QUERY
Interrupt a queued query. Specify the query by using its session ID.
To see the queries in the queue, use the SHOW QUERIES command:
To interrupt the last query in the list (ID 946-ooNP):
Showing the queries again indicates that 946-ooNP has been deleted:
- KILL QUERY is only available if the runtime query interrupt parameter (
enable-runtime-query-interrupt) is set. - Interrupting a query in ‘PENDING_QUEUE’ status is supported in both distributed and single-server mode.
- To enable query interrupt for tables imported from data files in local storage, set
enable_non_kernel_time_query_interruptto TRUE. (It is enabled by default.)