Oracle 视图 DBA_MVREF_STATS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图DBA_MVREF_STATS是通过使用来存储有关MV同义语句引用的统计信息的系统视图。该视图为用户提供有关同义语句到实际MV引用的统计信息,可以合理地估计其MV是否应该使用批处理方法重新构建。
这个视图提供了有关同义MV引用的信息,这些信息可以帮助DBA充分利用MV性能的优势。它显示了从最近的同义语句计数开始,应该在什么时候使用批处理MV更新。
要使用视图,可以执行以下操作:
1.确定有多少无变更MV被引用:
SELECT * FROM DBA_MVREF_STATS WHERE STATUS = ‘NOT CHANGED’
2.查看那些MV有一些变更,但很少被引用:
SELECT * FROM DBA_MVREF_STATS WHERE REFRESH_COUNT ‘NOT CHANGED’
3.查看哪些MV需要使用批量更新:
SELECT * FROM DBA_MVREF_STATS WHERE REFRESH_COUNT > 500
4.查看那些MV应该使用定期更新:
SELECT * FROM DBA_MVREF_STATS WHERE (REFRESH_COUNT BETWEEN 11 AND 100) AND STATUS = ‘NEW’
这样,使用DBA_MVREF_STATS视图,可以找出相应的同义语句中需要更新的MV,并根据其更新次数确定是否需要在定期或批量更新它们。
官方英文解释
DBA_MVREF_STATS
shows the REFRESH_ID
associated with each refresh run of each materialized view for the database. It also provides some basic timing statistics related to that materialized view’s refresh in that run.
Related View
USER_MVREF_STATS
shows the REFRESH_ID
associated with each refresh run of each materialized view for the database that is accessible to the current user. It also provides some basic timing statistics related to that materialized view’s refresh in that run. This view does not display the MV_OWNER
column.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
|
Owner of the materialized view |
|
|
|
Name of the materialized view |
|
|
|
The refresh ID of the refresh run |
|
|
The refresh method used to refresh the materialized view:
|
|
|
|
The refresh optimization, for example, a null refresh, or a primary key/foreign key that is applied during refresh of the materialize view |
|
|
|
The additional executions, for example, an index rebuild, or log operations involved during refresh of the materialized view |
|
|
|
Start time of the refresh run |
|
|
|
End time of the refresh run |
|
|
|
The length of time for the refresh run, in seconds |
|
|
|
Log setup time (in seconds) for the materialized view for a non-atomic refresh; |
|
|
|
Log purge time (in seconds) for the materialized view in the case of atomic refresh; |
|
|
|
Initial number of rows in the materialized view (at the start of the refresh) |
|
|
|
Final number of rows in the materialized view (at the end of the refresh) |
See Also:
“USER_MVREF_STATS”