Overview
ob_plan_cache_percentage specifies the percentage of memory available for the plan cache from the tenant's total memory.
Privilege requirements
Query variables
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Modify variables
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Int |
| Default Value | 5 |
| Value range | [0, 100] |
| Effective Scope | Global |
| Modifiable | Yes, you can use the following methods:SETStatement modification. |
Usage instructions
The maximum memory that can be used for plan caching (absolute memory limit) = Tenant memory limit × ob_plan_cache_percentage/100.
Configuration example
Set the memory usage for plan caching to 5%.
obclient> SET GLOBAL ob_plan_cache_percentage =5;