Note
This view is available starting with V4.3.0.
Purpose
The DBA_MVREF_RUN_STATS view displays information about each refresh run of a materialized view. Each run is identified by a REFRESH_ID. The information includes timing statistics related to the run and the parameters specified for the run.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| RUN_OWNER | VARCHAR2(128) | NO | The owner of the refresh operation (the user who initiated the operation). |
| REFRESH_ID | NUMBER | NO | The refresh ID. |
| NUM_MVS | NUMBER | NO | The number of materialized views refreshed. |
| MVIEWS | VARCHAR2(4000) | NO | The API-specified materialized view name parameter. |
| BASE_TABLES | VARCHAR2(4000) | YES | Reserved for internal use. |
| METHOD | VARCHAR2(4000) | YES | The API-specified METHOD parameter. |
| ROLLBACK_SEG | VARCHAR2(4000) | YES | The API-specified ROLLBACK_SEG parameter. |
| PUSH_DEFERRED_RPC | CHAR(1) | NO | The API-specified PUSH_DEFERRED_RPC parameter. |
| REFRESH_AFTER_ERRORS | CHAR(1) | NO | The API-specified REFRESH_AFTER_ERRORS parameter. |
| PURGE_OPTION | NUMBER | NO | The API-specified PURGE_OPTION parameter. |
| PARALLELISM | NUMBER | NO | The API-specified PARALLELISM parameter. |
| HEAP_SIZE | NUMBER | NO | The API-specified HEAP_SIZE parameter. |
| ATOMIC_REFRESH | CHAR(1) | NO | The API-specified ATOMIC_REFRESH parameter. |
| NESTED | CHAR(1) | NO | The API-specified NESTED parameter. |
| OUT_OF_PLACE | CHAR(1) | NO | The API-specified OUT_OF_PLACE parameter. |
| NUMBER_OF_FAILURES | NUMBER | NO | The number of failures that occurred during API processing. |
| START_TIME | TIMESTAMP(6) | NO | The start time of the refresh run. |
| END_TIME | TIMESTAMP(6) | NO | The end time of the refresh run. |
| ELAPSED_TIME | NUMBER | NO | The duration of the refresh run, in seconds. |
| LOG_SETUP_TIME | NUMBER | NO | The time taken to set up the materialized view log, in seconds
NoteThis column is compatible only and defaults to 0. |
| LOG_PURGE_TIME | NUMBER | NO | The time taken to purge the materialized view log, in seconds |
| COMPLETE_STATS_AVAILABLE | CHAR(1) | NO | Indicates whether complete refresh statistics are available for this run
NoteThis column is compatible only and defaults to Y. |
Sample query
Query information about each refresh run of a materialized view. Each run is identified by a REFRESH_ID.
obclient [SYS]> SELECT * FROM SYS.DBA_MVREF_RUN_STATS;
The query result is as follows:
+-----------+------------+---------+-----------------------+-------------+--------+--------------+-------------------+----------------------+--------------+-------------+-----------+----------------+--------+--------------+--------------------+---------------------+---------------------+--------------+----------------+----------------+--------------------------+
| RUN_OWNER | REFRESH_ID | NUM_MVS | MVIEWS | BASE_TABLES | METHOD | ROLLBACK_SEG | PUSH_DEFERRED_RPC | REFRESH_AFTER_ERRORS | PURGE_OPTION | PARALLELISM | HEAP_SIZE | ATOMIC_REFRESH | NESTED | OUT_OF_PLACE | NUMBER_OF_FAILURES | START_TIME | END_TIME | ELAPSED_TIME | LOG_SETUP_TIME | LOG_PURGE_TIME | COMPLETE_STATS_AVAILABLE |
+-----------+------------+---------+-----------------------+-------------+--------+--------------+-------------------+----------------------+--------------+-------------+-----------+----------------+--------+--------------+--------------------+---------------------+---------------------+--------------+----------------+----------------+--------------------------+
| root | 64670 | 1 | test_db.mv1_tbl1_tbl2 | NULL | NULL | NULL | N | N | 0 | 0 | 0 | N | N | N | 0 | 2024-01-17 16:26:28 | 2024-01-17 16:26:28 | 0 | 0 | 0 | Y |
| root | 64672 | 1 | test_db.mv2_tbl1_tbl2 | NULL | NULL | NULL | N | N | 0 | 0 | 0 | N | N | N | 0 | 2024-01-17 16:26:28 | 2024-01-17 16:26:28 | 0 | 0 | 0 | Y |
+-----------+------------+---------+-----------------------+-------------+--------+--------------+-------------------+----------------------+--------------+-------------+-----------+----------------+--------+--------------+--------------------+---------------------+---------------------+--------------+----------------+----------------+--------------------------+
2 rows in set (0.015 sec)