All Products
Search
Document Center

Lindorm:KILL QUERY

Last Updated:Mar 28, 2026

Slow queries that block resources or never complete can destabilize your workload. Use KILL QUERY to stop a running SQL statement.

The typical workflow is:

  1. Run SHOW PROCESSLIST to find the ID of the target query.

  2. Run KILL QUERY with that ID to stop it.

Applicable engines and versions

EngineSupported versions
LindormTable2.6.2 and later
LindormTSDBAll versions
Important

Lindorm SQL must be version 2.6.3.2 or later. To check your Lindorm SQL version, see SQL versions.

Syntax

KILL QUERY string_literal

Parameters

ParameterDescription
string_literalThe ID of the SQL statement to stop. Lindorm assigns a unique ID to each SQL statement by default. Retrieve the ID by running SHOW PROCESSLIST.

Example

The following example shows how to identify and stop a slow query.

Step 1: Run SHOW PROCESSLIST to find the ID of the query you want to stop.

SHOW PROCESSLIST;

Step 2: Copy the ID from the output and pass it to KILL QUERY.

KILL QUERY '6b0dbbbe-f294-4892-a129-05cd96f8afd0';
Note

This operation cannot be undone. Confirm the query ID in the SHOW PROCESSLIST output before running KILL QUERY.

What's next