Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays metadata about table groups, including information about partitions.
Note
Starting from V4.2.0, the partition attribute field in this view has no meaning and is displayed as NONE or NULL.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TABLEGROUP_NAME | VARCHAR2(128) | NO | The name of the table group. |
| PARTITIONING_TYPE | VARCHAR2(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 type. |
| SUBPARTITIONING_TYPE | VARCHAR2(13) | NO | The subpartitioning type of the table group. Valid values include:NONE: a non-partitioned table group or a table group with a single partitioning key.HASH: a hash-partitioned table group (with a single subpartitioning key).KEY: a key-partitioned table group.RANGE: a range-partitioned table group (with a single subpartitioning key).RANGE COLUMNS: a range columns-partitioned table group.LIST: a list-partitioned table group (with a single subpartitioning key).LIST COLUMNS: a list columns-partitioned table group.UNKNOWN: an abnormal type. |
| PARTITION_COUNT | NUMBER | NO | The value is NULL. |
| DEF_SUBPARTITION_COUNT | NUMBER | NO | The value is NULL. |
| PARTITIONING_KEY_COUNT | NUMBER | NO | The value is NULL. |
| SUBPARTITIONING_KEY_COUNT | NUMBER | NO | The value is NULL. |
| SHARDING | VARCHAR2(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 [SYS]> CREATE TABLEGROUP tblgroup1 SHARDING = 'PARTITION';Query the SHARDING attribute of the
TBLGROUP1table group.obclient [SYS]> SELECT TABLEGROUP_NAME, SHARDING FROM SYS.DBA_OB_TABLEGROUPS WHERE tablegroup_name = 'TBLGROUP1';The query result is as follows:
+-----------------+-----------+ | TABLEGROUP_NAME | SHARDING | +-----------------+-----------+ | TBLGROUP1 | PARTITION | +-----------------+-----------+ 1 row in set