Note
This variable was introduced in OceanBase Database V4.2.2.
Description
ob_enable_pl_cache specifies whether to enable the PL cache module.
Privilege requirements
Query variables
Global level
In both Oracle and MySQL modes, you can use the
SHOW VARIABLESstatement or theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the values of Global system variables in thesystenant and all user tenants.Session level
The
systenant and all user tenants can use theSHOW VARIABLESstatement or viewSYS.TENANT_VIRTUAL_SESSION_VARIABLE(Oracle mode) or viewinformation_schema.SESSION_VARIABLES(MySQL mode) to view the values of session system variables.
Modify variables
Global level
The
systenant has direct read/write access to the Global system variables.A MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the values of global system variables.An Oracle user tenant requires the
ALTER SYSTEMprivilege to modify the values of global system variables.
Session level
The
systenant and all user tenants can directly modify the values of the session system variables of their own tenants.
Attributes
| Attribute | Description |
|---|---|
| Parameter | Boolean |
| Default value | 1 |
| Value range |
|
| Scope |
|
| Modifiable | Yes. You can use the SET statement to modify the variable. |
Considerations
We recommend that you enable the PL cache module. If you disable the module, stored procedure recompilation will be triggered each time a stored procedure is executed.
Examples
Session-level operation
obclient> SET ob_enable_pl_cache=true;Global-level operation
obclient> SET GLOBAL ob_enable_pl_cache=true;