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

MV_OWNER

VARCHAR2(128)

NOT NULL

Owner of the materialized view

MV_NAME

VARCHAR2(128)

NOT NULL

Name of the materialized view

REFRESH_ID

NUMBER

NOT NULL

The refresh ID of the refresh run

REFRESH_METHOD

VARCHAR2(30)

The refresh method used to refresh the materialized view:

  • FAST

  • PCT

  • COMPLETE

  • OUT OF PLACE FAST

  • OUT OF PLACE PCT

  • OUT OF PLACE COMPLETE

REFRESH_OPTIMIZATIONS

VARCHAR2(4000)

The refresh optimization, for example, a null refresh, or a primary key/foreign key that is applied during refresh of the materialize view

ADDITIONAL_EXECUTIONS

VARCHAR2(4000)

The additional executions, for example, an index rebuild, or log operations involved during refresh of the materialized view

START_TIME

TIMESTAMP(6)

Start time of the refresh run

END_TIME

TIMESTAMP(6)

End time of the refresh run

ELAPSED_TIME

NUMBER

The length of time for the refresh run, in seconds

LOG_SETUP_TIME

NUMBER

Log setup time (in seconds) for the materialized view for a non-atomic refresh; NULL for an atomic refresh

LOG_PURGE_TIME

NUMBER

Log purge time (in seconds) for the materialized view in the case of atomic refresh; NULL in the case of non-atomic refresh

INITIAL_NUM_ROWS

NUMBER

Initial number of rows in the materialized view (at the start of the refresh)

FINAL_NUM_ROWS

NUMBER

Final number of rows in the materialized view (at the end of the refresh)

See Also:

“USER_MVREF_STATS”


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