Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays metadata about all table groups in all tenants in the system tenant, including the partitioning information of table groups.
Note
Starting from V4.2.0, the values of the partitioning attributes in this view are displayed as NONE or NULL.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID. |
| TABLEGROUP_NAME | varchar(128) | NO | Name of the table group. |
| PARTITIONING_TYPE | varchar(13) | NO | Partitioning type of the table group. Valid values include:NONE: non-partitioned table groupHASH: HASH partitioning (single partitioning key)KEY: KEY partitioningRANGE: RANGE partitioning (single partitioning key)RANGE COLUMNS: RANGE COLUMNS partitioningLIST: LIST partitioning (single partitioning key)LIST COLUMNS: LIST COLUMNS partitioningUNKNOWN: abnormal type
NoteThis field has a value of |
| SUBPARTITIONING_TYPE | varchar(13) | NO | Partitioning type of the table group. Valid values include:NONE: non-partitioned table group or partitioned table groupHASH: HASH partitioning (single partitioning key)KEY: KEY partitioningRANGE: RANGE partitioning (single partitioning key)RANGE COLUMNS: RANGE COLUMNS partitioningLIST: LIST partitioning (single partitioning key)LIST COLUMNS: LIST COLUMNS partitioningUNKNOWN: abnormal type
NoteThis field has a value of |
| PARTITION_COUNT | bigint(20) | NO | The value is NULL. |
| DEF_SUBPARTITION_COUNT | bigint(0) | NO | The value is NULL. |
| PARTITIONING_KEY_COUNT | bigint(20) | NO | The value is NULL. |
| SUBPARTITIONING_KEY_COUNT | bigint(20) | NO | The value is NULL. |
| SHARDING | varchar(10) | NO | SHARDING attribute of the table group. Valid values include:
NoteThis field was introduced in V4.2.0. |
Sample query
Create a table group named
tblgroup1.obclient [test]> CREATE TABLEGROUP tblgroup1 SHARDING = 'PARTITION';Query the SHARDING attribute of the
tblgroup1table group.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