Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays metadata about table groups, including partition information.
Note
In V4.2.0 and later, the partition attributes in this view are not meaningful and are uniformly displayed as NONE or NULL.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TABLEGROUP_NAME | varchar(128) | NO | The name of the table group. |
| PARTITIONING_TYPE | varchar(13) | NO | The partitioning type of the table group. Valid values include:NONE: a non-partitioned table group.HASH: a table group that uses hash partitioning (single partitioning key).KEY: a table group that uses key partitioning.RANGE: a table group that uses range partitioning (single partitioning key).RANGE COLUMNS: a table group that uses range columns partitioning.LIST: a table group that uses list partitioning (single partitioning key).LIST COLUMNS: a table group that uses list columns partitioning.UNKNOWN: an abnormal type.
NoteThe value of this field is |
| SUBPARTITIONING_TYPE | varchar(13) | NO | The partitioning type of the subpartitions in the table group. Valid values include:NONE: a non-partitioned table group or a table group that uses single-level partitioning.HASH: a table group that uses hash partitioning (single partitioning key).KEY: a table group that uses key partitioning.RANGE: a table group that uses range partitioning (single partitioning key).RANGE COLUMNS: a table group that uses range columns partitioning.LIST: a table group that uses list partitioning (single partitioning key).LIST COLUMNS: a table group that uses list columns partitioning.UNKNOWN: an abnormal type.
NoteThe value of this field is |
| 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 | The 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';View the SHARDING attribute of the
tblgroup1table group.obclient [test]> SELECT TABLEGROUP_NAME, SHARDING FROM oceanbase.DBA_OB_TABLEGROUPS WHERE tablegroup_name = 'tblgroup1';The query result is as follows:
+-----------------+-----------+ | TABLEGROUP_NAME | SHARDING | +-----------------+-----------+ | tblgroup1 | PARTITION | +-----------------+-----------+ 1 row in set