Note
For OceanBase Database V4.3.5, this variable was introduced in V4.3.5 BP1.
Purpose
The mview_refresh_dop variable specifies the default DOP for refreshing materialized views.
Privileges
Query variables
Global level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview (in MySQL mode) to view the values of global system variables.Session level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.SESSION_VARIABLESview (in MySQL mode) to view the values of session system variables.
Modify variables
Global level
The
systenant can directly modify the values of global system variables.MySQL-compatible tenants need the
SUPERorALTER SYSTEMprivilege to modify the values of global system variables.
Session level
The
systenant and all user tenants can directly modify the values of session system variables in their respective tenants.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Int |
| Default value | 4 |
| Value range | [0, uint64_max] |
| Effective scope |
|
| Effective mode | Immediately |
| Modifiable | Yes. It can be modified by using the SET statement. |
Settings
Session level
Set
mview_refresh_dopwithin the current session to control the default refresh parallelism for materialized views in that session. Any manual refresh of materialized views initiated in this session will use this value if parallelism is not explicitly specified.Global level
Set the
mview_refresh_dopglobally to affect all sessions, including both manual and automatic refreshes of materialized views. Any refresh initiated across sessions will use this value if parallelism is not explicitly specified.If you set the
mview_refresh_dopvariable to 0 or 1, parallel refreshes are disabled.
Examples
Set the default refresh parallelism for the current session.
obclient> SET mview_refresh_dop = 5;Set the global default refresh parallelism.
obclient> SET GLOBAL mview_refresh_dop = 5;