Note
This variable is available starting with V1.4.
Description
ob_plan_cache_percentage specifies the percentage of memory that can be used for the plan cache in a tenant.
Privilege requirements
Query variables
You can execute the
SHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the value of a global system variable. This operation is supported for thesystenant and all user tenants.Modify variables
The
systenant can directly modify the value of a global system variable.A MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.An Oracle user tenant must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 5 |
| Value range | [0, 100] |
| Scope | Global |
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Considerations
The maximum memory that can be used for the plan cache (absolute value) = tenant memory limit * ob_plan_cache_percentage/100.
Examples
Set the percentage of memory that can be used for the plan cache in a tenant to 5.
obclient> SET GLOBAL ob_plan_cache_percentage =5;