Note
This variable is available starting with OceanBase Database V4.3.5 BP1.
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 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 mode) to obtain the value of a session system variable.
Modify variables
Global level
systenant can modify the value of a global system variable.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
systenant and all user tenants can modify the value of a session system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 4 |
| Value range | [0, uint64_max] |
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Usage notes
Set the value at the session level:
You can execute the
SETstatement to setmview_refresh_dopin the current session. This value specifies the default parallelism for materialized view refresh in the current session. If you do not explicitly specify the parallelism for a manual materialized view refresh initiated in this session, the value ofmview_refresh_dopis used.Set the value at the global level:
You can execute the
SETstatement to setmview_refresh_dopglobally. This value specifies the default parallelism for materialized view refresh in all sessions. If you do not explicitly specify the parallelism for a manual or automatic materialized view refresh initiated in any session, the value ofmview_refresh_dopis used.When
mview_refresh_dopis set to 0 or 1, parallel refresh is not used.
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;
