oceanbase.CDB_IND_SUBPARTITIONS

2026-02-05 05:53:37  Updated

Note

This view is available starting with V4.0.0.

Purpose

This view displays information about all index subpartitions in the database.

Columns

Column Type Nullable? Description
CON_ID decimal(10,0) NO The tenant ID.
INDEX_OWNER varchar(128) NO The owner of the index.
INDEX_NAME varchar(128) NO The name of the index.
TABLE_NAME varchar(128) NO The name of the table to which the index belongs.
PARTITION_NAME varchar(128) NO The name of the partition.
SUBPARTITION_NAME varchar(128) NO The name of the subpartition.
HIGH_VALUE mediumtext NO The expression of the value bound to the subpartition.
HIGH_VALUE_LENGTH bigint(20) NO The length of the expression of the value bound to the subpartition.
PARTITION_POSITION bigint(20) NO The position of the partition in the index.
SUBPARTITION_POSITION bigint(20) NO The position of the subpartition in the partition.
STATUS varchar(8) NO Indicates whether the index partition is available.
TABLESPACE_NAME varchar(30) NO The name of the tablespace that contains the partition.
PCT_FREE bigint(0) NO This column is not supported. It is set to NULL by default.
INI_TRANS bigint(0) NO This column is not supported. It is set to NULL by default.
MAX_TRANS bigint(0) NO This column is not supported. It is set to NULL by default.
INITIAL_EXTENT bigint(0) NO This column is not supported. It is set to NULL by default.
NEXT_EXTENT bigint(0) NO This column is not supported. It is set to NULL by default.
MIN_EXTENT bigint(0) NO This column is not supported. It is set to NULL by default.
MAX_EXTENT bigint(0) NO This column is not supported. It is set to NULL by default.
MAX_SIZE bigint(0) NO This column is not supported. It is set to NULL by default.
PCT_INCREASE bigint(0) NO This column is not supported. It is set to NULL by default.
FREELISTS bigint(0) NO This column is not supported. It is set to NULL by default.
FREELIST_GROUPS bigint(0) NO This column is not supported. It is set to NULL by default.
LOGGING varchar(3) NO This column is not supported. It is set to NULL by default.
COMPRESSION varchar(13) NO Indicates whether the partition index is compressed:
  • ENABLE: Compressed
  • DISABLE: Not compressed
  • BLEVEL bigint(0) NO This column is not supported. It is set to NULL by default.
    LEAF_BLOCKS bigint(0) NO This column is not supported. It is set to NULL by default.
    DISTINCT_KEYS bigint(0) NO This column is not supported. It is set to NULL by default.
    AVG_LEAF_BLOCKS_PER_KEY bigint(0) NO This column is not supported. It is set to NULL by default.
    AVG_DATA_BLOCKS_PER_KEY bigint(0) NO This column is not supported. It is set to NULL by default.
    CLUSTERING_FACTOR bigint(0) NO This column is not supported. It is set to NULL by default.
    NUM_ROWS bigint(0) NO This column is not supported. It is set to NULL by default.
    SAMPLE_SIZE bigint(0) NO This column is not supported. It is set to NULL by default.
    LAST_ANALYZED date NO This column is not supported. It is set to NULL by default.
    BUFFER_POOL varchar(7) NO This column is not supported. It is set to NULL by default.
    FLASH_CACHE varchar(7) NO This column is not supported. It is set to NULL by default.
    CELL_FLASH_CACHE varchar(7) NO This column is not supported and is NULL by default.
    USER_STATS varchar(3) NO This column is not supported and is NULL by default.
    GLOBAL_STATS varchar(3) NO This column is not supported and is NULL by default.
    INTERVAL varchar(3) NO This column is not supported and is NULL by default.
    SEGMENT_CREATED varchar(3) NO This column is not supported and is NULL by default.
    DOMIDX_OPSTATUS varchar(6) NO This column is not supported and is NULL by default.
    PARAMETERS text NO This column is not supported and is NULL by default.

    Sample query

    In the sys tenant, query the subpartitions (subpartition) of the tbl2_f_rl index table in the tenant with ID 1002.

    obclient [oceanbase]> SELECT CON_ID, INDEX_OWNER, INDEX_NAME, PARTITION_NAME, SUBPARTITION_NAME, HIGH_VALUE, HIGH_VALUE_LENGTH, PARTITION_POSITION, SUBPARTITION_POSITION FROM oceanbase.CDB_IND_SUBPARTITIONS WHERE CON_ID=1002 AND TABLE_NAME='tbl2_f_rl';
    

    The query result is as follows:

    +--------+-------------+----------------+----------------+-------------------+------------+-------------------+--------------------+-----------------------+
    | CON_ID | INDEX_OWNER | INDEX_NAME     | PARTITION_NAME | SUBPARTITION_NAME | HIGH_VALUE | HIGH_VALUE_LENGTH | PARTITION_POSITION | SUBPARTITION_POSITION |
    +--------+-------------+----------------+----------------+-------------------+------------+-------------------+--------------------+-----------------------+
    |   1002 | infotest    | tbl2_f_rl_idx1 | p0             | sp0               | 1,3        |                 3 |                  1 |                     1 |
    |   1002 | infotest    | tbl2_f_rl_idx1 | p0             | sp1               | 4,6        |                 3 |                  1 |                     2 |
    |   1002 | infotest    | tbl2_f_rl_idx1 | p0             | sp2               | 7,9        |                 3 |                  1 |                     3 |
    |   1002 | infotest    | tbl2_f_rl_idx1 | p1             | sp3               | 1,3        |                 3 |                  2 |                     1 |
    |   1002 | infotest    | tbl2_f_rl_idx1 | p1             | sp4               | 4,6        |                 3 |                  2 |                     2 |
    |   1002 | infotest    | tbl2_f_rl_idx1 | p1             | sp5               | 7,9        |                 3 |                  2 |                     3 |
    +--------+-------------+----------------+----------------+-------------------+------------+-------------------+--------------------+-----------------------+
    6 rows in set
    
    Contact Us