Skip to main content

Posts

Showing posts with the label native

PL/SQL Optimization Levels and Native Code Generation

Charles Wetherell, Consulting Member of the PL/SQL development team, was kind enough to offer these insights regarding PL/SQL optimization and native code generation. A PL/SQL programmer asked why PL/SQL native code generation was turned off when the PL/SQL optimization level was set to 1. There are four PL/SQL optimization levels:  0. Esoteric for some long-since-passed compatibility issues with release 9 and before  1. Basic code generation with debugging data created  2. Global optimization  3. Automatic inlining of local procedures Each level builds on the level before. Debugging data is not created above level 1. Generally, native code generation is independent of optimization level. Native code generation is turned off at levels 1 (and 0) because it interferes with debugging. In other words, PL/SQL code compiled at optimization levels 0 and 1 is always interpreted when executed. You should never use level 0. That is a blanket prescription. Certainly no n...