Note
This view is available starting with V4.3.0.
Purpose
The DBA_MVIEW_LOGS view displays information about materialized view logs.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| LOG_OWNER | varchar(128) | NO | The name of the materialized view log owner. |
| MASTER | varchar(128) | NO | The name of the master table to which the materialized view log belongs. |
| LOG_TABLE | varchar(128) | NO | The name of the materialized view log table. |
| LOG_TRIGGER | varchar(128) | YES | The row-level trigger on the master table that inserts rows into the materialized view log.
NoteThis column is for compatibility and its value is NULL by default. |
| ROWIDS | varchar(3) | NO | Indicates whether to record rowid information
|
| PRIMARY_KEY | varchar(3) | NO | Indicates whether to record primary key information
|
| OBJECT_ID | varchar(3) | NO | Indicates whether to record object identifiers in the object table
NoteThis column is for compatibility and its value is NO by default. |
| FILTER_COLUMNS | varchar(3) | NO | Indicates whether to record filter column information
|
| SEQUENCE | varchar(3) | NO | Indicates whether to record sequence values that provide additional sorting information
NoteThe value of this column is always YES. |
| INCLUDE_NEW_VALUES | varchar(3) | NO | Indicates whether to record both old and new values
NoteThe value of this column is always YES. |
| PURGE_ASYNCHRONOUS | varchar(3) | NO | Indicates whether to asynchronously purge the materialized view log
|
| PURGE_DEFERRED | varchar(3) | NO | Indicates whether to defer the purging of the materialized view log
|
| PURGE_START | datetime | YES | The start date of the deferred purging. |
| PURGE_INTERVAL | varchar(200) | YES | The interval for deferred purging. |
| LAST_PURGE_DATE | datetime | YES | The date when the materialized view log was last purged. |
| LAST_PURGE_STATUS | bigint(1) | NO | The status of the last purge of the materialized view log
NoteThe value of this column is always 0. |
| NUM_ROWS_PURGED | bigint(20) | YES | The number of rows purged from the materialized view log in the last purge. |
| COMMIT_SCN_BASED | varchar(3) | NO | Indicates whether the materialized view log is based on commit SCN
NoteThe value of this column is always YES. |
| STAGING_LOG | varchar(3) | NO | Indicates whether the materialized view log is a staging log for synchronous refresh
NoteThis column is for compatibility and its value is NO by default. |
| PURGE_DOP | bigint(20) | NO | The parallelism for purging materialized view logs.
NoteFor OceanBase Database V4.3.5, this column is available starting from V4.3.5 BP2. |
| LAST_PURGE_TIME | bigint(20) | YES | The duration of the last materialized view log purge task, in seconds.
NoteFor OceanBase Database V4.3.5, this column is available starting from V4.3.5 BP2. |
Sample query
Query the information about materialized view logs and display the first record.
obclient [(none)]> SELECT * FROM oceanbase.DBA_MVIEW_LOGS LIMIT 1\G
The query result is as follows:
*************************** 1. row ***************************
LOG_OWNER: db_test
MASTER: tbl1
LOG_TABLE: mlog$_tbl1
LOG_TRIGGER: NULL
ROWIDS: NO
PRIMARY_KEY: YES
OBJECT_ID: NO
FILTER_COLUMNS: YES
SEQUENCE: YES
INCLUDE_NEW_VALUES: YES
PURGE_ASYNCHRONOUS: NO
PURGE_DEFERRED: YES
PURGE_START: 2025-04-23 15:01:25
PURGE_INTERVAL: sysdate() + interval 1 day
LAST_PURGE_DATE: 2025-04-23 15:01:30
LAST_PURGE_STATUS: 0
NUM_ROWS_PURGED: 0
COMMIT_SCN_BASED: YES
STAGING_LOG: NO
PURGE_DOP: 5
LAST_PURGE_TIME: 0
1 row in set