The EXPLAIN_REFRESH function is used to generate explanatory information for a materialized view refresh plan.
Note
For V5.x versions, EXPLAIN_REFRESH is introduced starting from V5.0.1.
Syntax
DBMS_MVIEW.EXPLAIN_REFRESH(
IN mv_name VARCHAR(65535),
IN method VARCHAR(65535) DEFAULT NULL,
IN nested BOOLEAN DEFAULT FALSE,
IN tenant_id INT DEFAULT 0)
RETURN LONGTEXT
Parameters
Parameter |
Description |
|---|---|
| mv_name | The name of the materialized view. You can specify a database name, for example,test.mv_sales. |
| method | Refresh method.AorCindicates a complete refresh.Findicates a quick refresh.?Indicates a forced refresh. Default value isNULL, indicating that the refresh method is defined by a materialized view. |
| nested | Whether to also specify the nested materialized views that are dependencies. Default value:FALSE, indicating that only the specified materialized view is described. |
| tenant_id | Target tenant ID. Default value:0, indicating the tenant to which the current session belongs. OnlysysA tenant can specify another tenant. |
Return value
Returns a LONGTEXT type description of the refresh plan, which includes the materialized view name, refresh method, refresh steps, SQL_ID, and refresh SQL.
References
For more information about refreshing materialized views, see Refresh a materialized view.