11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

454 CHAPTER <strong>11</strong> ■ APPLICATION DEVELOPMENTPLSQL_OPTIMIZE_LEVEL Allowed ValuesThe PLSQL_OPTIMIZE_LEVEL initialization parameter specifies the level of optimization used tocompile the PL/SQL library unit. Table <strong>11</strong>-2 describes the PLSQL_OPTIMIZE_LEVEL allowed values.Table <strong>11</strong>-2. PLSQL_OPTIMIZE_LEVEL Allowed ValuesValueDescription1 No PL/SQL compilation optimizations are done. This is the debug level.2 PL/SQL will rearrange code for performance but will not automatically inlinesubprograms. It will inline subprogram calls the developer has flagged with thepragma INLINE directive.3 In addition to the level 2 optimizations, the PL/SQL compiler will automatically inlinesubprograms where performance gains are predicted, as well as place a high priorityon inlining programmer flagged calls.You can modify this parameter at the system level or at the session level. DBAs can use theALTER SYSTEM command to set this level. In the following example, we will set PLSQL_OPTIMIZE_LEVEL to 3 for automatic inlining of subprograms:SQL> alter system set PLSQL_OPTIMIZE_LEVEL = 3;System altered.Scope and UsageInlining may occur only with subprogram calls that reside in the same package, procedure,function, or anonymous PL/SQL block. The pragma INLINE directive, if present, must appearimmediately before the subprogram call. When inlining subprograms in nonanonymous modules,the compiler can provide a number of useful warnings to help you verify that inlining did or didnot occur. Table <strong>11</strong>-3 shows several of the possible warning codes and descriptions associatedwith the warning codes.Table <strong>11</strong>-3. Warning Codes Indicating That Inlining Did Not OccurWarning CodePLW-050<strong>11</strong>PLW-06004PLW-06005Text and Descriptionpragma INLINE for the procedure does not apply to anycalls. The pragma INLINE directive does not appear immediately before the callto the procedure identified as . Note: this same messagewill be shown for functions as well.Inlining of call of procedure requested. The compilerfound the pragma INLINE and verified that it is before the identified procedureor function.Inlining of call of procedure was done. The compiler inlinedthe identified procedure. If PLSQL_OPTIMIZE_LEVEL is 3, this warning will appearwhen automatic inlining is done regardless of whether the pragma INLINE directiveis included.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!