Examine the following settings for a session:
PLSQL_CODE_TYPE = NATIVE
PLSQL_OPTIMIZE_LEVEL = 3
Which statement would be true in this scenario?
A.
The compiler would automatically inline subprograms.
B.
The compiler would inline the code for external subroutines.
C.
The compiler would inline the code even if the INLINE pragma is set to NO.
D.
The compiler would not inline the code unless the INLINE pragma is set to YES.
A.
http://docs.oracle.com/database/121/REFRN/refrn10255.htm#REFRN10255
3 – Applies a wide range of optimization techniques beyond those of level 2, automatically including techniques not specifically requested.
http://docs.oracle.com/database/121/LNPLS/tuning.htm#LNPLS01201
“With PLSQL_OPTIMIZE_LEVEL=3, the PL/SQL compiler seeks opportunities to inline subprograms. You need not specify subprograms to be inlined. However, you can use the INLINE pragma (with the preceding syntax) to give a subprogram a high priority for inlining, and then the compiler inlines it unless other considerations or limits make the inlining undesirable.”
and this
“To turn off inlining for a subprogram, use the INLINE pragma:
PRAGMA INLINE (subprogram, ‘NO’)”
A
A.
Subprogram Inlining
Subprogram inlining replaces a subprogram invocation with a copy of the invoked
subprogram.
To allow subprogram inlining, either accept the default value of the PLSQL_OPTIMIZE_LEVEL compilation parameter (which is 2) or set it to 3.
With PLSQL_OPTIMIZE_LEVEL=2, you must specify each subprogram to be inlined
with the INLINE pragma: PRAGMA INLINE (subprogram, ‘YES’)
To turn off inlining for a subprogram, use the INLINE pragma:
PRAGMA INLINE (subprogram, ‘NO’)
http://docs.oracle.com/database/121/LNPLS/tuning.htm#LNPLS01201