Overview
mview_refresh_dop controls the default refresh parallelism for materialized views.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Session level
The
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.SESSION_VARIABLESview to view the values of session system variables.
Modify variables
Global effective
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session expiration
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Int |
| Default Value | 4 |
| Value range | [0, uint64_max] |
| Effective Scope |
|
| Modifiable | Yes, you can use theSETStatement modification |
Usage instructions
Session-level settings:
Sets
mview_refresh_dopfor the current session to control the default refresh parallelism for materialized views in that session. For manual refreshes of materialized views initiated in this session later on, this value will be used if no parallelism is explicitly specified.Global settings:
Sets the global
mview_refresh_dop, which affects all sessions, including both manual and automatic materialized view refreshes. For all subsequent sessions initiating a materialized view refresh, if the degree of parallelism is not explicitly specified, this value will be used.When
mview_refresh_dopis set to 0 or 1, parallel refresh is not enabled.
Configuration example
Sets the default parallelism for session-level refreshes.
obclient> SET mview_refresh_dop = 5;Sets the global default refresh parallelism.
obclient> SET GLOBAL mview_refresh_dop = 5;