Note
This view is available starting with V4.0.0.
Overview
Displays the meta information of a table group, mainly its partition information.
Note
Starting from V4.2.0, the partition attribute fields in this view will no longer have meaning and are uniformly displayed as NONE or NULL.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TABLEGROUP_NAME | varchar(128) | NO | Table group name |
| PARTITIONING_TYPE | varchar(13) | NO | Partition type of a partitioned table group's partition:
NoteThis field is |
| SUBPARTITIONING_TYPE | varchar(13) | NO | Partition types for subpartitions of a partitioned table group:
NoteThis field is |
| PARTITION_COUNT | bigint(20) | NO | The number of partitions in a partitioned table group. For a non-partitioned table group, this value isNULL |
| DEF_SUBPARTITION_COUNT | bigint(0) | NO | The number of partitions in the subpartition template of a partitioned table group. For a table group without a defined subpartition template, this value isNULL |
| PARTITIONING_KEY_COUNT | bigint(20) | NO | The number of partitioning keys for a partitioned table group. For a non-partitioned table group, this value isNULL |
| SUBPARTITIONING_KEY_COUNT | bigint(20) | NO | The number of partitioning keys for a subpartitioned table group. For a non-subpartitioned table group, this value isNULL |
| SHARDING | varchar(10) | NO | The SHARDING attribute of the table group. Valid values:
NoteThis field is available starting with V4.2.0. |
Sample query
Create a table group named
tblgroup1.obclient [test]> CREATE TABLEGROUP tblgroup1 SHARDING = 'PARTITION';Check the SHARDING attribute of the table group
tblgroup1.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
