Skip to main content
Skip to main content

SHOW-TABLETS


{ "title": "SHOW-TABLETS", "language": "en"

}

SHOW-TABLETS

Name

SHOW TABLETS

Description

This statement is used to list tablets of the specified table (only for administrators)

grammar:

SHOW TABLETS FROM [database.]table [PARTITIONS(p1,p2)]
[WHERE where_condition]
[ORDER BY col_name]
[LIMIT [offset,] row_count]
  1. Syntax Description:

where_condition could be one of:

Version = version
state = "NORMAL|ROLLUP|CLONE|DECOMMISSION"
BackendId = backend_id
IndexName = rollup_name

or compound them with operator AND.

Example

  1. list all tablets of the specified table

    SHOW TABLETS FROM example_db.table_name;
  2. list all tablets of the specified partitions

    SHOW TABLETS FROM example_db.table_name PARTITIONS(p1, p2);
  3. list all DECOMMISSION tablets on the specified backend

    SHOW TABLETS FROM example_db.table_name WHERE state="DECOMMISSION" AND BackendId=11003;

Keywords

SHOW, TABLETS

Best Practice