Note
This view is available starting with V4.0.0.
Purpose
This view displays the metadata of a table group, including the partition information.
Note
Starting from V4.2.0, the partition attribute fields in this view will no longer have meaning and will be 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 primary partitions of the table group. Valid values:
NoteStarting from V4.2.0, the value of this column is |
| SUBPARTITIONING_TYPE | varchar(13) | NO | The partitioning type of the subpartitions of the table group. Valid values:
NoteStarting from V4.2.0, the value of this column 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(20) | NO | The SHARDING attribute of the table group. Valid values:
NoteThis column is available starting from 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.DBA_OB_TABLEGROUPS WHERE tablegroup_name = 'tblgroup1';The query result is as follows:
+-----------------+-----------+ | TABLEGROUP_NAME | SHARDING | +-----------------+-----------+ | tblgroup1 | PARTITION | +-----------------+-----------+ 1 row in set
