Skip to main content
Skip table of contents

Query Management

SYSADMIN.killQuery

This procedure kills a running query by id from the SYSLOG.QueryLogs system table:

SQL
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.

Here is an example:

SQL
SELECT * FROM SYSLOG.QueryLogs ;;
-- use the "id" from the result
CALL SYSADMIN.killQuery(1) ;;

SYSADMIN.killSession

This procedure kills a session by id:

SQL
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.

Here is an example:

SQL
SELECT * FROM SYSLOG.QueryLogs ;;
-- use the "sessionId" from the result 
CALL SYSADMIN.killSession('njWUGSusn8rz') ;;
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.