Note
This view is available starting with V4.0.0.
Purpose
This view displays the partition information of all tenant partitioned tables.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | The tenant ID. |
| OWNER | varchar(128) | NO | The owner of the partitioned table. |
| TABLE_NAME | varchar(128) | NO | The name of the partitioned table. |
| PARTITIONING_TYPE | varchar(13) | NO | The partitioning method: |
| SUBPARTITIONING_TYPE | varchar(13) | NO | The subpartitioning method: |
| PARTITION_COUNT | bigint(20) | NO | The number of partitions in the partitioned table. |
| DEF_SUBPARTITION_COUNT | bigint(20) | NO | For a composite partitioned table, the number of subpartitions. |
| PARTITIONING_KEY_COUNT | bigint(21) | NO | The number of partitioning keys. |
| SUBPARTITIONING_KEY_COUNT | bigint(21) | NO | For a composite partitioned table, the number of subpartitioning keys. |
| STATUS | varchar(8) | NO | This column is not supported. It is set to NULL by default. |
| DEF_TABLESPACE_NAME | varchar(30) | NO | The name of the tablespace to which the partitioned table belongs. |
| DEF_PCT_FREE | bigint(0) | NO | This column is not supported. It is set to NULL by default. |
| DEF_PCT_USED | bigint(0) | NO | This column is not supported. It is set to NULL by default. |
| DEF_INI_TRANS | bigint(0) | NO | This column is not supported. It is set to NULL by default. |
| DEF_MAX_TRANS | bigint(0) | NO | This column is not supported. It is set to NULL by default. |
| DEF_INITIAL_EXTENT | varchar(40) | NO | This column is not supported. It is set to NULL by default. |
| DEF_NEXT_EXTENT | varchar(40) | NO | This column is not supported. It is set to NULL by default. |
| DEF_MIN_EXTENTS | varchar(40) | NO | This column is not supported. It is set to NULL by default. |
| DEF_MAX_EXTENTS | varchar(40) | NO | This column is not supported. It is set to NULL by default. |
| DEF_MAX_SIZE | varchar(40) | NO | This column is not supported. It is set to NULL by default. |
| DEF_PCT_INCREASE | varchar(40) | NO | This column is not supported. It is set to NULL by default. |
| DEF_FREELISTS | bigint(0) | NO | This column is not supported. It is set to NULL by default. |
| DEF_FREELIST_GROUPS | bigint(0) | NO | This column is not supported. It is set to NULL by default. |
| DEF_LOGGING | varchar(7) | NO | This column is not supported. It is set to NULL by default. |
| DEF_COMPRESSION | varchar(8) | NO | Indicates whether compression is enabled. |
| DEF_COMPRESS_FOR | varchar(12) | NO | The compression method. |
| DEF_BUFFER_POOL | varchar(7) | NO | This column is not supported. It is set to NULL by default. |
| DEF_FLASH_CACHE | varchar(7) | NO | This column is not supported. It is set to NULL by default. |
| DEF_CELL_FLASH_CACHE | varchar(7) | NO | This column is not supported. It is set to NULL by default. |
| REF_PTN_CONSTRAINT_NAME | varchar(128) | NO | This column is not supported. It is set to NULL by default. |
| INTERVAL | text | YES | This column is not supported. It is set to NULL by default. |
| AUTOLIST | varchar(3) | NO | Indicates whether the table is automatically partitioned by using automatic list partitioning: |
| INTERVAL_SUBPARTITION | text | NO | The string representation of the subpartition interval. |
| AUTOLIST_SUBPARTITION | varchar(3) | NO | Indicates whether automatic list partitioning is used for this subpartition: |
| IS_NESTED | varchar(3) | NO | This column is not supported. It is set to NULL by default. |
| DEF_SEGMENT_CREATED | varchar(4) | NO | This column is not supported. It is set to NULL by default. |
| DEF_INDEXING | varchar(3) | NO | Indicates the index attribute specified for the table. Valid values: |
| DEF_INMEMORY | varchar(8) | NO | This column is not supported. It is set to NULL by default. |
| DEF_INMEMORY_PRIORITY | varchar(8) | NO | This column is not supported. It is set to NULL by default. |
| DEF_INMEMORY_DISTRIBUTE | varchar(15) | NO | This column is not supported. It is set to NULL by default. |
| DEF_INMEMORY_COMPRESSION | varchar(17) | NO | This column is not supported. It is set to NULL by default. |
| DEF_INMEMORY_DUPLICATE | varchar(13) | NO | This column is not supported. It is set to NULL by default. |
| DEF_READ_ONLY | varchar(3) | NO | Indicates the default setting for new partitions: |
| DEF_CELLMEMORY | varchar(24) | NO | This column is not supported. It is set to NULL by default. |
| DEF_INMEMORY_SERVICE | varchar(12) | NO | This column is not supported. It is set to NULL by default. |
| DEF_INMEMORY_SERVICE_NAME | text | NO | This column is not supported. It is set to NULL by default. |
| AUTO | varchar(3) | NO | Indicates whether the table is automatically partitioned: |
Sample query
In the sys tenant, query the partition information of the partitioned table tbl1_h for the tenant with ID 1002.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_PART_TABLES WHERE CON_ID=1002 AND TABLE_NAME='tbl1_h'\G
The query result is as follows:
*************************** 1. row ***************************
CON_ID: 1002
OWNER: infotest
TABLE_NAME: tbl1_h
PARTITIONING_TYPE: HASH
SUBPARTITIONING_TYPE: NONE
PARTITION_COUNT: 5
DEF_SUBPARTITION_COUNT: 0
PARTITIONING_KEY_COUNT: 1
SUBPARTITIONING_KEY_COUNT: 0
STATUS: NULL
DEF_TABLESPACE_NAME: NULL
DEF_PCT_FREE: NULL
DEF_PCT_USED: NULL
DEF_INI_TRANS: NULL
DEF_MAX_TRANS: NULL
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: NULL
DEF_FREELIST_GROUPS: NULL
DEF_LOGGING: NULL
DEF_COMPRESSION: ENABLED
DEF_COMPRESS_FOR: zstd_1.3.8
DEF_BUFFER_POOL: NULL
DEF_FLASH_CACHE: NULL
DEF_CELL_FLASH_CACHE: NULL
REF_PTN_CONSTRAINT_NAME: NULL
INTERVAL: NULL
AUTOLIST: NO
INTERVAL_SUBPARTITION: NULL
AUTOLIST_SUBPARTITION: NO
IS_NESTED: NULL
DEF_SEGMENT_CREATED: NULL
DEF_INDEXING: NULL
DEF_INMEMORY: NULL
DEF_INMEMORY_PRIORITY: NULL
DEF_INMEMORY_DISTRIBUTE: NULL
DEF_INMEMORY_COMPRESSION: NULL
DEF_INMEMORY_DUPLICATE: NULL
DEF_READ_ONLY: NULL
DEF_CELLMEMORY: NULL
DEF_INMEMORY_SERVICE: NULL
DEF_INMEMORY_SERVICE_NAME: NULL
AUTO: NO
1 row in set
References
To query the partition information of the partitioned tables in the current tenant, see DBA_PART_TABLES.