Note
This variable is available starting with V1.4.
Description
ob_enable_plan_cache specifies whether to enable Plan Cache.
Privilege requirements
Query variables
Global level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to obtain the values of Global system variables.Session level
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to obtain the values of Session system variables.
Modify variables
Global level
systenant can directly 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.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the value of a Global system variable.
Session level
systenant and all user tenants can directly modify the value of a Session system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Boolean |
| Default value | 1 |
| Value range |
|
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Enable Plan Cache.
Session level
obclient> SET ob_enable_plan_cache =1;Global level
obclient> SET GLOBAL ob_enable_plan_cache =1;
