Note
For V4.4.2, this view is available starting with V4.4.2 BP2.
Overview
This view displays the relationships between materialized views and their dependent objects across all tenants.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID. |
| MVIEW_OWNER | varchar(128) | NO | The owner name of the materialized view. |
| MVIEW_NAME | varchar(256) | NO | The name of the materialized view. |
| DEP_OWNER | varchar(128) | NO | Represents the name of the dependency object owner. |
| DEP_NAME | varchar(256) | NO | Represents the name of the dependent object. |
| DEP_TYPE | varchar(64) | NO | Represents the dependency object type:
|
Sample query
Query the relationship between the materialized view mv_mv1_tbl3_tbl4 and its dependent objects.
obclient> SELECT * FROM oceanbase.CDB_MVIEW_DEPS
WHERE MVIEW_NAME = 'mv_mv1_tbl3_tbl4';
The query result is as follows:
+-----------+--------------+------------------+--------------+---------------+----------+
| TENANT_ID | MVIEW_OWNER | MVIEW_NAME | DEP_OWNER | DEP_NAME | DEP_TYPE |
+-----------+--------------+------------------+--------------+---------------+----------+
| 1002 | test_db | mv_mv1_tbl3_tbl4 | test_db | mv1_tbl3_tbl4 | MV |
| 1004 | TEST_USER001 | MV_MV1_TBL3_TBL4 | TEST_USER001 | MV1_TBL3_TBL4 | MV |
+-----------+--------------+------------------+--------------+---------------+----------+
2 rows in set
