Oracle 视图 DBA_MVIEW_ANALYSIS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle中的视图DBA_MVIEW_ANALYSIS用来显示复制表(materialized view)正在进行的所有分析状态,可以定期检查准确度通过查看分析状态,从而避免早期发现的问题。

该视图的列名包括:

OWNER:复制表的拥有者
MVIEW_NAME:复制表的名称
STALE_PERCENT:同步度百分比(介于0 – 100之间)
STALE_ITEMS:未及时更新的行数
LAST_REFRESH_TYPE:最近更新方式(手动、自动或强制更新)
LAST_REFRESH_DATE:最近更新日期
LAST_ANALYSIS_DATE:最近分析日期
NEXT_REFRESH_DATE:下次更新日期
NEXT_REFRESH_METHOD:下次更新方式

使用方法:
1. 用户可以查询特定复制表的分析状态。
例:SELECT * FROM DBA_MVIEW_ANALYSIS WHERE MVIEW_NAME=’MV_EMP’;
2. 查找所有复制表的未及时更新的行数。
例:SELECT STALE_PERCENT FROM DBA_MVIEW_ANALYSIS;
3. 获取所有复制表的最近更新日期。
例:SELECT LAST_REFRESH_DATE FROM DBA_MVIEW_ANALYSIS;

官方英文解释

DBA_MVIEW_ANALYSIS describes all materialized views in the database that potentially support query rewrite and that provide additional information for analysis by applications. Its columns are the same as those in ALL_MVIEW_ANALYSIS.

Note:

This view excludes materialized views that reference remote tables or that include references to non-static values such as SYSDATE or USER. This view also excludes materialized views that were created as snapshots before Oracle8i and that were never altered to enable query rewrite.

See Also:

“ALL_MVIEW_ANALYSIS”


数据运维技术 » Oracle 视图 DBA_MVIEW_ANALYSIS 官方解释,作用,如何使用详细说明