Note
This view is available starting with V4.0.0.
Overview
The system tenant displays the meta information of table groups for all tenants, primarily showing the partition information of the table groups.
Note
Starting from V4.2.0, the partition attribute fields in this view will no longer have meaning and are uniformly displayed as NONE or NULL.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| TABLEGROUP_NAME | varchar(128) | NO | Table group name |
| PARTITIONING_TYPE | varchar(13) | NO | Partition type of a partitioned table group:
NoteThis field is |
| SUBPARTITIONING_TYPE | varchar(13) | NO | Partition type of the subpartitioned table group:
NoteStarting from V4.2.0, the value of this field is |
| PARTITION_COUNT | bigint(0) | NO | The value isNULL |
| DEF_SUBPARTITION_COUNT | bigint(0) | NO | This value isNULL |
| PARTITIONING_KEY_COUNT | bigint(0) | NO | The value isNULL |
| SUBPARTITIONING_KEY_COUNT | bigint(0) | NO | The value isNULL |
| SHARDING | varchar(20) | NO | The SHARDING attribute of the table group. Valid values:
NoteThis field is available starting with V4.2.0. |
| SCOPE | varchar(20) | NO | Table group'sSCOPEAttribute. Valid values:
NoteFor V4.4.2, this field is available starting with V4.4.2 BP1. |
Sample query
Query the attributes of table group tblgroup1.
obclient> SELECT * FROM oceanbase.CDB_OB_TABLEGROUPS
WHERE tablegroup_name = 'tblgroup1'
LIMIT 1\G
The return result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
TABLEGROUP_NAME: tblgroup1
PARTITIONING_TYPE: NONE
SUBPARTITIONING_TYPE: NONE
PARTITION_COUNT: NULL
DEF_SUBPARTITION_COUNT: NULL
PARTITIONING_KEY_COUNT: NULL
SUBPARTITIONING_KEY_COUNT: NULL
SHARDING: NONE
SCOPE: ZONE
1 row in set
