Note
This variable is available starting with V1.4.
Description
ob_enable_plan_cache specifies whether to enable the Plan Cache.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (in Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (in MySQL mode) to query the value of a global system variable.Session level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (in Oracle mode) or theinformation_schema.SESSION_VARIABLESview (in MySQL mode) to query the value of a session system variable.
Modify variables
Global
The
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
The
systenant and all user tenants can directly modify the value of a session system variable in their own tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Bool |
| Default value | 1 |
| Value range |
|
| Effective scope |
|
| Modifiable | Yes, you can modify the value by using the SET statement. |
Examples
Enable the plan cache.
Session level
obclient> SET ob_enable_plan_cache =1;Global level
obclient> SET GLOBAL ob_enable_plan_cache =1;