All Products
Search
Document Center

Lindorm:KILL QUERY

Last Updated:Apr 28, 2024

Slow queries that take a long time to execute or respond affect the stability of your business. You can use the SHOW PROCESSLIST syntax to identify these queries and then use the KILL QUERY syntax to terminate the query statements that are being executed.

Applicable engines and versions

  • The KILL QUERY syntax is applicable to LindormTable and LindormTSDB.

  • The KILL QUERY syntax is supported by LindormTable 2.6.2 and later versions.

  • The KILL QUERY syntax is supported by all versions of LindormTSDB.

Important

The Lindorm SQL version must be 2.6.3.2 or later. For more information about how to view the version of Lindorm SQL, see SQL versions.

Syntax

kill_statement      ::=  KILL QUERY string_literal

Parameters

SQL statement ID (string_literal)

By default, Lindorm assigns an ID for each SQL statement. You can specify an ID in the KILL QUERY statement to terminate the specified SQL statement. For more information about how to query the ID of a SQL statement, see SHOW PROCESSLIST.

Example

Terminate a SQL statement whose ID is 6b0dbbbe-f294-4892-a129-05cd96f8afd0.

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