Note
This variable is available starting with V4.3.5 BP1 of OceanBase Database V4.3.5.
Description
mview_refresh_dop specifies the default parallelism for materialized view refresh.
Privilege requirements
Query variables
Global level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theinformation_schema.GLOBAL_VARIABLESview (MySQL-compatible mode) to obtain the value of a global system variable.Session level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theinformation_schema.SESSION_VARIABLESview (MySQL-compatible mode) to obtain the value of a session system variable.
Modify variables
Global level
systenant can directly modify the value of a global system variable.MySQL user tenants can modify the value of a global system variable only if they have the
SUPERorALTER SYSTEMprivilege.
Session level
systenant and all user tenants can directly modify the value of a session system variable.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Int |
| Default value | 4 |
| Value range | [0, uint64_max] |
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Usage
Set the value at the session level:
In the current session, set
mview_refresh_dopto specify the default parallelism for materialized view refresh in this session. If you do not explicitly specify the parallelism when you manually refresh a materialized view in this session, the system uses the value set formview_refresh_dop.Set the value at the global level:
Set
mview_refresh_dopat the global level to specify the default parallelism for materialized view refresh in all sessions. If you do not explicitly specify the parallelism when you manually or automatically refresh a materialized view in any session, the system uses the value set formview_refresh_dop.If you set
mview_refresh_dopto 0 or 1, the system does not use the parallel refresh feature.
Examples
Set the default parallelism for materialized view refresh in the current session.
obclient> SET mview_refresh_dop = 5;Set the default parallelism for materialized view refresh at the global level.
obclient> SET GLOBAL mview_refresh_dop = 5;