查询管理Queries management

.show 查询.show queries

.show queries 命令返回已达到最终状态的查询列表,并且调用该命令的用户有权查看:The .show queries command returns a list of queries that have reached a final state, and that the user invoking the command has access to see:

语法Syntax

.show queries.show queries

.show 正在运行的查询.show running queries

.show running queries 命令返回用户或另一个用户或所有用户当前正在执行的查询的列表。The .show running queries command returns a list of currently-executing queries by the user, or by another user, or by all users.

语法Syntax

.show running queries
  • (1) 返回调用用户当前正在执行的查询(需要读取访问权限)。(1) returns the currently-executing queries by the invoking user (requires read access).

.cancel 查询.cancel query

.cancel query 命令开始尽力尝试取消同一用户先前启动的特定查询。The .cancel query command starts a best-effort attempt to cancel a specific query previously started by the same user.

  • 集群管理员可以取消任何正在运行的查询。Cluster admins can cancel any running query.
  • 数据库管理员可以取消对其具有管理员访问权限的数据库调用的任何正在运行的查询。Database admins can cancel any running query that was invoked on a database they have admin access on.
  • 其他用户只能取消他们启动的查询。Other users may only cancel queries that they started.

语法Syntax

.cancel query ClientRequestId.cancel query ClientRequestId

  • “ClientRequestId”是原始查询 ClientRequestId 字段的值,形式为 string 文本。ClientRequestId is the value of the original queries ClientRequestId field, as a string literal.

示例Example

.cancel query "KE.RunQuery;8f70e9ab-958f-4955-99df-d2a288b32b2c"