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.
Privilege requirements
Query variables
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle-compatible mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL-compatible mode) to view the value of global system variables.Modify variables
The
systenant can directly modify the value of global system variables.A MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of global system variables.An Oracle user tenant must have the
ALTER SYSTEMprivilege to modify the value of global system variables.
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. |
Usage notes
The maximum memory that can be used for the plan cache = tenant memory limit * ob_plan_cache_percentage/100.
Examples
Set the percentage of memory that can be used for the plan cache to 5.
obclient> SET GLOBAL ob_plan_cache_percentage =5;