plsql_optimize_level specifies the optimization level during PL code compilation.
Privilege requirements
Query variables
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.SESSION_VARIABLESview to view the values of session system variables.Modify variables
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Overview
Attribute |
Description |
|---|---|
| Parameter type | Int |
| Default Value | 0 |
| Value range | [0,3]
|
| Effective Scope |
|
| Modifiable | Yes, you can use theSETorALTER SYSTEM SETStatement modification. |
Usage instructions
A higher optimization level instructs the compiler to perform more optimization steps. We recommend that you set plsql_optimize_level = 2.
Configuration example
Set the PL optimization level globally to
1, which disables frontend optimization and enables backend optimization.obclient> SET GLOBAL plsql_optimize_level = 1;Set the PL optimization level globally to
2to enable both frontend and backend optimizations.obclient> SET GLOBAL plsql_optimize_level = 2;