Note
This view is available starting with V4.0.0.
Overview
Displays the partition information of all partitioned tables for the current tenant.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TABLE_OWNER | varchar(128) | NO | USER of the partitioned table |
| TABLE_NAME | varchar(128) | NO | Partitioned table name |
| COMPOSITE | varchar(3) | NO | Whether it is a multi-level partition |
| PARTITION_NAME | varchar(128) | NO | Partition name |
| SUBPARTITION_COUNT | bigint(20) | NO | Number of Subpartitions |
| HIGH_VALUE | mediumtext | NO | Partition Expression |
| HIGH_VALUE_LENGTH | bigint(20) | NO | Length of partition expression |
| PARTITION_POSITION | bigint(20) | NO | Partition Location |
| TABLESPACE_NAME | varchar(30) | NO | Tablespace name of the partition |
| PCT_FREE | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| PCT_USED | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INI_TRANS | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| MAX_TRANS | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INITIAL_EXTENT | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| NEXT_EXTENT | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| MIN_EXTENT | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| MAX_EXTENT | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| MAX_SIZE | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| PCT_INCREASE | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| FREELISTS | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| FREELIST_GROUPS | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| LOGGING | varchar(7) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| COMPRESSION | varchar(8) | NO | Whether to enable compression |
| COMPRESS_FOR | varchar(30) | NO | Compression Method |
| NUM_ROWS | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| BLOCKS | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| EMPTY_BLOCKS | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| AVG_SPACE | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| CHAIN_CNT | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| AVG_ROW_LEN | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| SAMPLE_SIZE | bigint(0) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| LAST_ANALYZED | date | NO | This field is not supported. Currently, the default value of this field is NULL. |
| BUFFER_POOL | varchar(7) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| FLASH_CACHE | varchar(7) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| CELL_FLASH_CACHE | varchar(7) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| GLOBAL_STATS | varchar(3) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| USER_STATS | varchar(3) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| IS_NESTED | varchar(3) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| PARENT_TABLE_PARTITION | varchar(128) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INTERVAL | varchar(3) | NO | This field is not supported. Currently, the default value of this field isNO |
| SEGMENT_CREATED | varchar(4) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INDEXING | varchar(4) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| READ_ONLY | varchar(4) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INMEMORY | varchar(8) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INMEMORY_PRIORITY | varchar(8) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INMEMORY_DISTRIBUTE | varchar(15) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INMEMORY_COMPRESSION | varchar(17) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INMEMORY_DUPLICATE | varchar(13) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| CELLMEMORY | varchar(24) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INMEMORY_SERVICE | varchar(12) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| INMEMORY_SERVICE_NAME | varchar(100) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| MEMOPTIMIZE_READ | varchar(8) | NO | This field is not supported. Currently, the default value of this field is NULL. |
| MEMOPTIMIZE_WRITE | varchar(8) | NO | This field is not supported. Currently, the default value of this field is NULL. |
Sample query
The user tenant queries the partition information of the partitioned table t2_m_rch within its own tenant.
obclient [oceanbase]> SELECT TABLE_OWNER, TABLE_NAME, COMPOSITE, PARTITION_NAME, SUBPARTITION_COUNT, HIGH_VALUE_LENGTH, PARTITION_POSITION
FROM oceanbase.DBA_TAB_PARTITIONS
WHERE TABLE_NAME='t2_m_rch';
The query result is as follows:
+-------------+------------+-----------+----------------+--------------------+-------------------+--------------------+
| TABLE_OWNER | TABLE_NAME | COMPOSITE | PARTITION_NAME | SUBPARTITION_COUNT | HIGH_VALUE_LENGTH | PARTITION_POSITION |
+-------------+------------+-----------+----------------+--------------------+-------------------+--------------------+
| infotest | t2_m_rch | YES | p0 | 5 | 3 | 1 |
| infotest | t2_m_rch | YES | p1 | 5 | 3 | 2 |
| infotest | t2_m_rch | YES | p2 | 5 | 3 | 3 |
+-------------+------------+-----------+----------------+--------------------+-------------------+--------------------+
3 rows in set
References
Query the partition information of partitioned tables for all tenants: CDB_TAB_PARTITIONS
View detailed information about subpartitions of partitioned tables in the current tenant: DBA_TAB_SUBPARTITIONS
