Which statement is true about the execution of the PROC1 procedure in this scenario?

Examine the following settings for a session:
PLSQL_CODE_TYPE = NATIVE
View the Exhibit and examine the PL/SQL code.

You compile the program with the following attributes:
SQL> ALTER PROCEDURE proc1 COMPILE PLSQL_OPTIMIZE_LEVEL = 1;
Which statement is true about the execution of the PROC1 procedure in this scenario?

Examine the following settings for a session:
PLSQL_CODE_TYPE = NATIVE
View the Exhibit and examine the PL/SQL code.

You compile the program with the following attributes:
SQL> ALTER PROCEDURE proc1 COMPILE PLSQL_OPTIMIZE_LEVEL = 1;
Which statement is true about the execution of the PROC1 procedure in this scenario?

A.
The FUNC1 function would be called inline because PRAGMA INLINE forces a specific call to
be inlined.

B.
The FUNC1 function would be inlined because the value set for the PLSQL_CODE_TYPE
parameter is set to NATIVE.

C.
The FUNC1 function would be called inline irrespective of the value set for the
PLSQL_OPTIMIZE_LEVEL parameter.

D.
The FUNC1 function would not be called inline because the value for the
PLSQL_OPTIMIZE_LEVEL parameter is set to a lower value.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


ja

ja

D.

1 –
Applies a wide range of optimizations to PL/SQL programs including the elimination of unnecessary computations and exceptions, but generally does not move source code out of its original source order.

PRAGMA INLINE doesn’t force, it only suggest to inline. –
The PRAGMA INLINE (identifier, ‘YES’) very strongly encourages the compiler to inline a particular call, but the compiler might not to do so if other considerations or limits make the inlining undesirable. If you specify PRAGMA INLINE ( identifier,’NO’), the compiler does not inline calls to subprograms named identifier (see Example 13-3).

http://docs.oracle.com/cd/B28359_01/server.111/b28320/initparams184.htm#REFRN10255
docs.oracle.com/cd/B28359_01/appdev.111/b28370/inline_pragma.htm#LNPLS01362

PIERO

PIERO

http://www.oracle.com/technetwork/testcontent/o39ocp-087552.html

Automatic Subprogram Inlining
Automatic subprogram inlining is an optimization process that replaces procedure calls with a copy of the body of the procedure. As a result, automatic subprogram inlining can reduce the overhead associated with calling subprograms while leaving your original source code in its modular state.

In Oracle Database 11g, the PL/SQL compiler can automatically identify the subprograms that should be inlined and then do the inlining. This process of subprogram inlining is controlled by the PLSQL_OPTIMIZE_LEVEL parameter and the INLINE pragma. Setting PLSQL_OPTIMIZE_LEVEL to 2 means that you must specify each subprogram to be inlined with the INLINE pragma, and setting PLSQL_OPTIMIZE_LEVEL to 3 means that automatic inlining is attempted beyond those subprograms that you specify.

Within a PL/SQL subroutine, the PRAGMA INLINE value can be set in the following ways:

NO indicates that no inlining occurs, regardless of the PLSQL_OPTIMIZE_LEVEL setting and the YES pragmas.
YES indicates that automatic inlining is attempted at PLSQL_OPTIMIZE_LEVEL level 2 for a particular call, and it increases the priority of inlining at level 3 for a call.

gelete

gelete

D.
INLINE Pragma (pragma = compiler directive)

YES
If PLSQL_OPTIMIZE_LEVEL=2, YES specifies that the subprogram call is to be inlined.
If PLSQL_OPTIMIZE_LEVEL=3, YES specifies that the subprogram call has a high priority for inlining.

The PRAGMA INLINE (identifier, ‘YES’) very strongly encourages the compiler to inline a particular call, but the compiler might not to do so if other considerations or limits make the inlining undesirable.

Usage Notes
The INLINE pragma affects only the immediately following declaration or statement, and only some kinds of statements.
The INLINE pragma does not affect statements that are not in the list:
Assignment, Call, Conditional, CASE, CONTINUE-WHEN, EXECUTE IMMEDIATE, EXIT-WHEN, LOOP, RETURN

http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/inline_pragma.htm#LNPLS01362