Overview
The system tenant displays the meta information of table groups for all tenants, primarily showing the partition information of the table groups.
Note
The partition attribute fields in this view 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:
|
| SUBPARTITIONING_TYPE | varchar(13) | NO | Partition type of a subpartition of a partitioned table group:
|
| PARTITION_COUNT | bigint(20) | NO | This value is NULL |
| DEF_SUBPARTITION_COUNT | bigint(0) | NO | This value is NULL |
| PARTITIONING_KEY_COUNT | bigint(20) | NO | This value is NULL |
| SUBPARTITIONING_KEY_COUNT | bigint(20) | NO | The value is NULL |
| SHARDING | varchar(20) | NO | The SHARDING attribute of the table group. Valid values:
|
Sample query
Create a table group named
tblgroup1.obclient [test]> CREATE TABLEGROUP tblgroup1 SHARDING = 'PARTITION';View the SHARDING attribute of the table group
tblgroup1.obclient [test]> SELECT TABLEGROUP_NAME, SHARDING FROM oceanbase.CDB_OB_TABLEGROUPS WHERE tablegroup_name = 'tblgroup1';The query result is as follows:
+-----------------+-----------+ | TABLEGROUP_NAME | SHARDING | +-----------------+-----------+ | tblgroup1 | PARTITION | +-----------------+-----------+ 1 row in set