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 no longer meaningful and are uniformly displayed as NONE or NULL.
Columns
| Column | Type | Null? | 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 HASH-partitioned table group (with a single partitioning key).KEY: a KEY-partitioned table group.RANGE: a RANGE-partitioned table group (with a single partitioning key).RANGE COLUMNS: a RANGE COLUMNS-partitioned table group.LIST: a LIST-partitioned table group (with a single partitioning key).LIST COLUMNS: a LIST COLUMNS-partitioned table group.UNKNOWN: an abnormal partitioning type.
NoteThis field is |
| SUBPARTITIONING_TYPE | varchar(13) | NO | The partitioning type of the table group. Valid values include:NONE: a non-partitioned table group or a partitioned table group.HASH: a HASH-partitioned table group (with a single partitioning key).KEY: a KEY-partitioned table group.RANGE: a RANGE-partitioned table group (with a single partitioning key).RANGE COLUMNS: a RANGE COLUMNS-partitioned table group.LIST: a LIST-partitioned table group (with a single partitioning key).LIST COLUMNS: a LIST COLUMNS-partitioned table group.UNKNOWN: an abnormal partitioning type.
NoteThis 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