Note
This variable is available starting with V4.2.3 BP1.
plsql_optimize_level specifies the optimization level for PL/SQL compilation.
Privilege requirements
Query variables
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to view the values of session system variables.Modify variables
systenant and all user tenants can directly modify the values of session system variables in their own tenants.
Description
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 0
Starting from V4.4.1, the default value of this variable is 0. |
| Value range | [0,3]
|
| Scope |
|
| Modifiable | Yes. You can execute the SET or ALTER SYSTEM SET statement to modify the value. |
Usage
The higher the optimization level, the more optimization operations the compiler will perform. We recommend that you set plsql_optimize_level to 2.
Examples
MySQL mode
Set the PL optimization level to
1globally to disable front-end optimization and enable back-end optimization.obclient> SET GLOBAL plsql_optimize_level = 1;Set the PL optimization level to
2globally to enable both front-end and back-end optimization.obclient> SET GLOBAL plsql_optimize_level = 2;
Oracle mode
Set the PL optimization level to
1globally to disable front-end optimization and enable back-end optimization.obclient> ALTER SYSTEM SET plsql_optimize_level = 1;Set the PL optimization level to
2globally to enable both front-end and back-end optimization.obclient> ALTER SYSTEM SET plsql_optimize_level = 2;
