Kill queries¶
KILL QUERY
can terminate the query being executed, and is often used to terminate slow queries.
Syntax¶
KILL QUERY (session=<session_id>, plan=<plan_id>);
session_id
: The ID of the session.plan_id
: The ID of the execution plan.
The ID of the session and the ID of the execution plan can uniquely determine a query. Both can be obtained through the SHOW QUERIES statement.
Examples¶
This example executes KILL QUERY
in one session to terminate the query in another session.
nebula> KILL QUERY(SESSION=1625553545984255,PLAN=163);
The query will be terminated and the following information will be returned.
[ERROR (-1005)]: Execution had been killed
Last update: August 23, 2021