Note
For V4.3.5, this parameter is available starting with V4.3.5 BP5.
Description
enable_mv_binlog_minimal_mode specifies whether to enable the binlog minimal mode for incremental refreshes of materialized views.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query the value of this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Boolean |
| Default value | False |
| Value range |
|
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
The
enable_mv_binlog_minimal_modeparameter affects only the DML operations of materialized views. It does not affect other DML operations.The
enable_mv_binlog_minimal_modeparameter is independent of the binlog_row_image parameter. It specifies the behavior of materialized views only.- If you enable the
enable_mv_binlog_minimal_modeparameter, the DML operations of materialized views use thebinlog minimalmode, regardless of the value of thebinlog_row_imageparameter.
- If you enable the
Enabling the
enable_mv_binlog_minimal_modeparameter improves the refresh performance of materialized views. However, it simplifies the contents ofCLOG. If downstream data synchronization links (such as CDC + OMS) rely on the completeCLOGof materialized views for migration and synchronization, enabling this parameter may cause exceptions in the synchronization links. Therefore, we recommend that you do not enable this parameter if downstream data synchronization links require the completeCLOGof materialized views.
Examples
Enable the
binlog minimalmode for incremental refreshes of materialized views.obclient> ALTER SYSTEM SET enable_mv_binlog_minimal_mode = True;Create a table named
test_tbl1.obclient> CREATE TABLE test_tbl1(col1 INT, col2 INT, col3 INT);Create a materialized view named
mv1_t1.obclient> CREATE MATERIALIZED VIEW mv1_t1 REFRESH FAST AS SELECT col2, COUNT(*) cnt FROM test_tbl1 GROUP BY col2;When you perform incremental refreshes, the DML operations use the
binlog minimalmode.obclient> CALL DBMS_MVIEW.REFRESH('mv1_t1', 'f');Disable the
binlog minimalmode for incremental refreshes of materialized views.obclient> ALTER SYSTEM SET enable_mv_binlog_minimal_mode = False;