Overview
enable_mv_binlog_minimal_mode specifies whether to enable the binlog minimal mode for incremental refresh of materialized views.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Bool |
| Default Value | False |
| Value range |
|
| Modifiable | Yes, you can use the following methods:ALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
The
enable_mv_binlog_minimal_modeparameter only affects the DML behavior of materialized views and does not affect other DML operations.The
enable_mv_binlog_minimal_modeparameter is not affected by binlog_row_image, as it specifies the special path for materialized view scenarios.- If the
enable_mv_binlog_minimal_modeswitch is turned on, even ifbinlog_row_imageis set tofull, DML operations on materialized views will still useminimalmode.
- If the
Enabling the
enable_mv_binlog_minimal_modeparameter can optimize the refresh performance of materialized views. However, this parameter simplifies the content ofCLOG. When downstream links (such as CDC + OMS) rely on the completeCLOGof materialized views for migration or synchronization, enabling this parameter may cause exceptions in the synchronization link. Therefore, it is not recommended to enable this switch when there is downstream data synchronization that requires materialized views.
Configuration example
Enable
binlog minimalmode for incremental refresh scenarios of materialized views.obclient> ALTER SYSTEM SET enable_mv_binlog_minimal_mode = True;Create the table
test_tbl1.obclient> CREATE TABLE test_tbl1(col1 INT, col2 INT, col3 INT);Create the materialized view
mv1_t1.obclient> CREATE MATERIALIZED VIEW mv1_t1 REFRESH FAST AS SELECT col2, COUNT(*) cnt FROM test_tbl1 GROUP BY col2;During incremental refresh, DML operations use the
binlog minimalmode.obclient> CALL DBMS_MVIEW.REFRESH('mv1_t1', 'f');Disable the
binlog minimalmode in incremental refresh scenarios of materialized views.obclient> ALTER SYSTEM SET enable_mv_binlog_minimal_mode = False;