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
sysand all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the value of Global system variables.Modify variables
systenants can directly modify the value of Global system variables.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of Global system variables.Oracle user tenants 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 amount of memory that can be used for the plan cache is equal to the tenant memory limit multiplied by the value of ob_plan_cache_percentage divided by 100. For more information about the maximum memory limit, see ob_plan_cache_percentage.
Examples
Set the percentage of memory that can be used for the plan cache to 5.
obclient> SET GLOBAL ob_plan_cache_percentage =5;