All Products
Search
Document Center

PolarDB:SHOW COLUMNAR INDEX

Last Updated:Mar 28, 2026

Queries Clustered Columnar Indexes (CCIs) that have been created or are being created on a PolarDB-X instance.

Prerequisites

Before you begin, ensure that you have:

  • A PolarDB-X instance running version 5.4.19-16989811 or later

Syntax

SHOW COLUMNAR {INDEX | INDEXES} [FROM [schema_name.]tbl_name]

schema_name and tbl_name are optional. Use them to filter by table name or to query tables in a different database.

Examples

Query all CCIs in the current database

SHOW COLUMNAR INDEX;

Query the CCIs of a specific table

SHOW COLUMNAR INDEX FROM xxx_tb;

Query the CCIs of a table in a different database

SHOW COLUMNAR INDEX FROM xxx_db.xxx_tb;

Output

Running SHOW COLUMNAR INDEX returns a result set similar to the following:

+---------------+---------+-------------------+-----------+-----------+----------------+---------------+--------------------+-----------------+-----------+--------+
| SCHEMA        | TABLE   | INDEX_NAME        | CLUSTERED | PK_NAMES  | COVERING_NAMES | PARTITION_KEY | PARTITION_STRATEGY | PARTITION_COUNT | SORT_KEY  | STATUS |
+---------------+---------+-------------------+-----------+-----------+----------------+---------------+--------------------+-----------------+-----------+--------+
| columnar_test | t_order | cc_i_seller_$07f0 | true      | id        |                | order_id      | DIRECT_HASH        |              16 | seller_id | PUBLIC |
+---------------+---------+-------------------+-----------+-----------+----------------+---------------+--------------------+-----------------+-----------+--------+

The following table describes each column in the output.

ColumnDescription
SCHEMAThe name of the database.
TABLEThe name of the table.
INDEX_NAMEThe name of the index.
CLUSTEREDSpecifies whether the index is a covered index. Valid value: true.
PK_NAMESThe primary key column.
COVERING_NAMESThe covering column.
PARTITION_KEYThe partition key column.
PARTITION_STRATEGYThe partitioning type. For example, DIRECT_HASH.
PARTITION_COUNTThe number of partitions.
SORT_KEYThe sort key.
STATUSThe status of the index. Valid values: CREATING (the index is being built) and PUBLIC (the index is built and available for queries).

What's next

To view general index information, use the SHOW INDEX statement.