Note
This view is available starting with V4.0.0.
Purpose
This view displays the metadata of a table group, including the partition information of the table group.
Note
Starting from V4.2.0, the partition attribute fields in this view will no longer have any meaning and will be uniformly 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 partition type of the primary partition of the table group. Valid values:
NONE: the table group is not partitioned.
HASH: the table group is partitioned by HASH (single partition key).
KEY: the table group is partitioned by KEY.
RANGE: the table group is partitioned by RANGE (single partition key).
RANGE COLUMNS: the table group is partitioned by RANGE COLUMNS.
LIST: the table group is partitioned by LIST (single partition key).
LIST COLUMNS: the table group is partitioned by LIST COLUMNS.
UNKNOWN: an unknown partition type.
|
| SUBPARTITIONING_TYPE |
VARCHAR2(13) |
NO |
The partition type of the subpartition of the table group. Valid values:
NONE: the table group is not partitioned or the table group is partitioned at the primary partition level.
HASH: the table group is partitioned by HASH (single partition key).
KEY: the table group is partitioned by KEY.
RANGE: the table group is partitioned by RANGE (single partition key).
RANGE COLUMNS: the table group is partitioned by RANGE COLUMNS.
LIST: the table group is partitioned by LIST (single partition key).
LIST COLUMNS: the table group is partitioned by LIST COLUMNS.
UNKNOWN: an unknown partition type.
|
| PARTITION_COUNT |
NUMBER |
NO |
This value is NULL. |
| DEF_SUBPARTITION_COUNT |
NUMBER |
NO |
This value is NULL. |
| PARTITIONING_KEY_COUNT |
NUMBER |
NO |
This value is NULL. |
| SUBPARTITIONING_KEY_COUNT |
NUMBER |
NO |
This value is NULL. |
| SHARDING |
VARCHAR2(20) |
NO |
The SHARDING attribute of the table group. Valid values:
NONE: for the table group with this attribute, all partitions of all tables in the table group are aggregated on the same server, and no restrictions are imposed on tables added to the table group.
PARTITION: for the table group with this attribute, the data of each table in the table group is scattered by primary partitions. If the table is a subpartitioned table, all subpartitions under each primary partition are aggregated.
ADAPTIVE: for the table group with this attribute, the data of each table in the table group is scattered based on the adaptive method. That is, if the table is a partitioned table, the data is scattered by primary partitions; if the table is a subpartitioned table, the data is scattered by subpartitions under each primary partition.
Note
This column is available starting with V4.2.0.
|
Sample query
Create a table group named tblgroup1.
obclient [SYS]> CREATE TABLEGROUP tblgroup1 SHARDING = 'PARTITION';
Query the SHARDING attribute of the table group TBLGROUP1.
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
References
Table groups