Note
This view is available starting with V4.0.0.
Purpose
This view displays the partition information of the partition indexes of all tenants.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CON_ID | decimal(10,0) | NO | Tenant ID. |
| OWNER | varchar(128) | NO | Owner of the partitioned index. |
| INDEX_NAME | varchar(128) | NO | Name of the partitioned index. |
| TABLE_NAME | varchar(128) | NO | Name of the table associated with the index. |
| PARTITIONING_TYPE | varchar(13) | NO | Partitioning method: |
| SUBPARTITIONING_TYPE | varchar(13) | NO | Subpartitioning method: |
| PARTITION_COUNT | bigint(20) | NO | Number of partitions in the index. |
| DEF_SUBPARTITION_COUNT | bigint(20) | NO | For composite partitioned indexes, the default number of subpartitions (if specified). |
| PARTITIONING_KEY_COUNT | bigint(21) | NO | Number of columns in the partitioning key. |
| SUBPARTITIONING_KEY_COUNT | bigint(21) | NO | For composite partitioned indexes, the number of subpartitioning keys. |
| LOCALITY | varchar(6) | NO | Indicates whether the partitioned index is local (LOCAL) or global (GLOBAL). |
| ALIGNMENT | varchar(12) | NO | Indicates whether the partitioned index is prefixed (PREFIXED) or non-prefixed (NON_PREFIXED). |
| DEF_TABLESPACE_NAME | varchar(30) | NO | For local indexes, the default tablespace when adding or splitting table partitions. |
| DEF_PCT_FREE | bigint(1) | NO | This column is not supported. The default value is 0. |
| DEF_INI_TRANS | bigint(1) | NO | This column is not supported. The default value is 0. |
| DEF_MAX_TRANS | bigint(1) | NO | This column is not supported. The default value is 0. |
| DEF_INITIAL_EXTENT | varchar(40) | NO | This column is not supported. The default value is NULL. |
| DEF_NEXT_EXTENT | varchar(40) | NO | This column is not supported. The default value is NULL. |
| DEF_MIN_EXTENTS | varchar(40) | NO | This column is not supported. The default value is NULL. |
| DEF_MAX_EXTENTS | varchar(40) | NO | This column is not supported. The default value is NULL. |
| DEF_MAX_SIZE | varchar(40) | NO | This column is not supported. The default value is NULL. |
| DEF_PCT_INCREASE | varchar(40) | NO | This column is not supported. The default value is NULL. |
| DEF_FREELISTS | bigint(1) | NO | This column is not supported. The default value is 0. |
| DEF_FREELIST_GROUPS | bigint(1) | NO | This column is not supported. The default value is 0. |
| DEF_LOGGING | varchar(7) | NO | This column is not supported. The default value is NULL. |
| DEF_BUFFER_POOL | varchar(7) | NO | This column is not supported. The default value is NULL. |
| DEF_FLASH_CACHE | varchar(7) | NO | This column is not supported. The default value is NULL. |
| DEF_CELL_FLASH_CACHE | varchar(7) | NO | This column is not supported. The default value is NULL. |
| DEF_PARAMETERS | text | NO | This column is not supported. The default value is NULL. |
| INTERVAL | text | NO | This column is not supported. The default value is NO. |
| AUTOLIST | varchar(3) | NO | Indicates whether the local index is automatically partitioned by list partitioning. Valid values: |
| INTERVAL_SUBPARTITION | text | NO | This column is not supported. The default value is NULL. |
| AUTOLIST_SUBPARTITION | text | NO | This column is not supported. The default value is NULL. |
Sample query
In the sys tenant, query the partition information of the partitioned index tbl1_h_idx1 in the tenant with ID 1002.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_PART_INDEXES WHERE CON_ID=1002 AND INDEX_NAME='tbl1_h_idx1'\G
The query result is as follows:
*************************** 1. row ***************************
CON_ID: 1002
OWNER: infotest
INDEX_NAME: tbl1_h_idx1
TABLE_NAME: tbl1_h
PARTITIONING_TYPE: RANGE
SUBPARTITIONING_TYPE: NONE
PARTITION_COUNT: 3
DEF_SUBPARTITION_COUNT: 0
PARTITIONING_KEY_COUNT: 1
SUBPARTITIONING_KEY_COUNT: 0
LOCALITY: GLOBAL
ALIGNMENT: PREFIXED
DEF_TABLESPACE_NAME: NULL
DEF_PCT_FREE: 0
DEF_INI_TRANS: 0
DEF_MAX_TRANS: 0
DEF_INITIAL_EXTENT: NULL
DEF_NEXT_EXTENT: NULL
DEF_MIN_EXTENTS: NULL
DEF_MAX_EXTENTS: NULL
DEF_MAX_SIZE: NULL
DEF_PCT_INCREASE: NULL
DEF_FREELISTS: 0
DEF_FREELIST_GROUPS: 0
DEF_LOGGING: NULL
DEF_BUFFER_POOL: NULL
DEF_FLASH_CACHE: NULL
DEF_CELL_FLASH_CACHE: NULL
DEF_PARAMETERS: NULL
INTERVAL: NO
AUTOLIST: NO
INTERVAL_SUBPARTITION: NULL
AUTOLIST_SUBPARTITION: NULL
1 row in set
References
For more information about how to query the partition information of a partitioned index in the current tenant, see DBA_PART_INDEXES.