Query Management
SYSADMIN.killQuery
This procedure kills a running query by id from SYSADMIN.Queries
.
CALL SYSADMIN.killQuery(IN id biginteger NOT NULL)
When you call the killQuery()
system procedure, a cancel request is sent to the system. Once a query is marked as cancelled, it is killed as soon as possible, asynchronously.
Here is an example:
SELECT * FROM SYSADMIN.Queries ;;
CALL SYSADMIN.killQuery(1) ;;
SYSADMIN.killSession
This procedure kills a session by id:
SYSADMIN.killSession(IN sessionId string NOT NULL)
When you call the killSession()
system procedure, a cancel request is sent to the system, and the session is killed as soon as possible, asynchronously.
Here is an example:
SELECT * FROM SYSADMIN.Queries;
CALL SYSADMIN.killSession('njWUGSusn8rz');