跳到主要内容

SHOW QUEUED ANALYZE JOBS

Description

This statement is used to view the queue of statistics collection jobs waiting to be executed.

Syntax

SHOW QUEUED ANALYZE JOBS [ <table_name> ]
[ WHERE PRIORITY = {"HIGH" | "MID" | "LOW" | "VERY_LOW"} ];

Optional Parameters

1. <table_name>

Table name. If specified, you can view the job queue information corresponding to the table. If not specified, the job queue information of all tables will be returned by default.

2. WHERE PRIORITY = {"HIGH" | "MID" | "LOW" | "VERY_LOW"}

Filter conditions of job priority. If not specified, information about jobs of all priority will be displayed by default.

Return Value

ColumnNote
catalog_nameCatalog name
db_namedatabase name
tbl_nametable name
col_listcolumn name list
priorityjob priority

Access Control Requirements

The user who executes this SQL must have at least the following permissions:

PrivilegeObjectNotes
SELECT_PRIVTableWhen executing SHOW, the SELECT_PRIV privilege for the queried table is required.

Examples

  1. Show jobs by table name.
SHOW QUEUED ANALYZE JOBS REGION;
+--------------+---------+----------+---------------------------------------------------+----------+
| catalog_name | db_name | tbl_name | col_list | priority |
+--------------+---------+----------+---------------------------------------------------+----------+
| internal | test | region | region:r_regionkey | HIGH |
| internal | test | region | region:r_name | MID |
| internal | test | region | region:r_comment,region:r_name,region:r_regionkey | LOW |
+--------------+---------+----------+---------------------------------------------------+----------+
  1. Show job by job priority.
SHOW QUEUED ANALYZE JOBS WHERE PRIORITY="HIGH";
+--------------+---------+----------+--------------------+----------+
| catalog_name | db_name | tbl_name | col_list | priority |
+--------------+---------+----------+--------------------+----------+
| internal | test | region | region:r_regionkey | HIGH |
+--------------+---------+----------+--------------------+----------+