DBA_MVREF_STATS

2024-06-28 05:30:30  Updated

Note

This view is introduced since OceanBase Database V4.3.0.

Purpose

The DBA_MVREF_STATS view displays the basic timing statistics on each refresh of each materialized view.

Columns

Column Type Nullable? Description
MV_OWNER varchar(128) NO The owner of the materialized view.
MV_NAME varchar(128) NO The name of the materialized view.
REFRESH_ID bigint(20) NO The ID of the refresh.
REFRESH_METHOD varchar(30) NO The method used to refresh the materialized view. Valid values:
  • FAST: The materialized view is fast refreshed.
  • COMPLETE: The materialized view is completely refreshed.
REFRESH_OPTIMIZATIONS text NO The refresh optimization, such as a null refresh, or a primary key or foreign key used during the refresh.

Note

This column is used only for compatibility and is NULL by default.

ADDITIONAL_EXECUTIONS text NO Additional executions, such as an index rebuild or log operations performed during the refresh.

Note

This column is used only for compatibility and is NULL by default.

START_TIME datetime NO The start time of the refresh.
END_TIME datetime NO The end time of the refresh.
ELAPSED_TIME bigint(20) NO The duration of the refresh, in seconds.
LOG_SETUP_TIME bigint(1) NO The log setup time for the materialized views, in seconds.

Note

This column is used only for compatibility and is 0 by default.

LOG_PURGE_TIME bigint(20) NO The log purge time for the materialized views, in seconds.
INITIAL_NUM_ROWS bigint(20) NO The initial number of rows in the materialized view when the refresh starts.
FINAL_NUM_ROWS bigint(20) NO The final number of rows in the materialized view when the refresh ends.

Sample query

obclient [test_db]> SELECT * FROM oceanbase.DBA_MVREF_STATS;

The query result is as follows:

+----------+---------------+------------+----------------+-----------------------+-----------------------+---------------------+---------------------+--------------+----------------+----------------+------------------+----------------+
| MV_OWNER | MV_NAME       | REFRESH_ID | REFRESH_METHOD | REFRESH_OPTIMIZATIONS | ADDITIONAL_EXECUTIONS | START_TIME          | END_TIME            | ELAPSED_TIME | LOG_SETUP_TIME | LOG_PURGE_TIME | INITIAL_NUM_ROWS | FINAL_NUM_ROWS |
+----------+---------------+------------+----------------+-----------------------+-----------------------+---------------------+---------------------+--------------+----------------+----------------+------------------+----------------+
| test_db  | mv1_tbl1_tbl2 |      64670 | COMPLETE       | NULL                  | NULL                  | 2024-01-17 16:26:28 | 2024-01-17 16:26:28 |            0 |              0 |              0 |                0 |              0 |
| test_db  | mv2_tbl1_tbl2 |      64672 | COMPLETE       | NULL                  | NULL                  | 2024-01-17 16:26:28 | 2024-01-17 16:26:28 |            0 |              0 |              0 |                0 |              0 |
+----------+---------------+------------+----------------+-----------------------+-----------------------+---------------------+---------------------+--------------+----------------+----------------+------------------+----------------+
2 rows in set (0.009 sec)

Contact Us