Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The oceanbase.DBA_OB_TABLEGROUP_TABLES view displays associations between table groups and tables in the current tenant. Tables that do not belong to a table group are not displayed.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TABLEGROUP_NAME | varchar(128) | NO | The name of the table group. |
| OWNER | varchar(128) | NO | The name of the database where the table belongs. |
| TABLE_NAME | varchar(256) | NO | The name of the table. |
| SHARDING | varchar(10) | NO | The SHARDING attribute of the table group. The value can be one of the following:
|
Sample query
In the sys tenant, query the associations of the table group named tblgroup1 in the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_TABLEGROUP_TABLES WHERE tablegroup_name = 'tblgroup1';
The query result is as follows:
+-----------------+-----------+------------+----------+
| TABLEGROUP_NAME | OWNER | TABLE_NAME | SHARDING |
+-----------------+-----------+------------+----------+
| tblgroup1 | infotest | tbl1 | ADAPTIVE |
+-----------------+-----------+------------+----------+
1 row in set