Note
- For V4.6.x, this parameter is available starting with V4.6.0.
- For V4.4.x, this parameter is available starting with V4.4.2.
- 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 refresh 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 |
|---|---|
| Parameter 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 DML operations on materialized views. Other DML operations are not affected.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 on materialized views use thebinlog minimalmode, regardless of the value of thebinlog_row_imageparameter.
- If you enable the
Enabling the
enable_mv_binlog_minimal_modeparameter can improve the refresh performance of materialized views. However, it simplifies the content ofCLOG. If downstream data synchronization links (such as CDC + OMS) rely on completeCLOGdata of 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 completeCLOGdata of materialized views.
Examples
Enable the
binlog minimalmode for incremental refresh 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;During incremental refresh, DML operations use the
binlog minimalmode.obclient> CALL DBMS_MVIEW.REFRESH('mv1_t1', 'f');Disable the
binlog minimalmode for incremental refresh of materialized views.obclient> ALTER SYSTEM SET enable_mv_binlog_minimal_mode = False;
