Which statement is true about the INLINE pragma procedure calls?

The PLSQL_OPTIMIZE_LEVEL parameter is set to 2 for the session.
Examine the section of code given:
FUNCTION p2 (p boolean) return PLS_INTEGER IS …
FUNCTION p2 (x PLS_INTEGER) return PLS_INTEGER IS
… …
PRAGMA INLINE(p2, ‘YES’);
x := p2(true) + p2(3);

Which statement is true about the INLINE pragma procedure calls?

The PLSQL_OPTIMIZE_LEVEL parameter is set to 2 for the session.
Examine the section of code given:
FUNCTION p2 (p boolean) return PLS_INTEGER IS …
FUNCTION p2 (x PLS_INTEGER) return PLS_INTEGER IS
… …
PRAGMA INLINE(p2, ‘YES’);
x := p2(true) + p2(3);

Which statement is true about the INLINE pragma procedure calls?

A.
Only the call to the P2 function with BOOLEAN as the argument is inlined.

B.
INLINE pragma affects both the functions named P2 and is called inline.

C.
Only the call to the P2 function with PLS_INTEGER as the argument is inlined.

D.
None of the functions are inlined because inlining is not supported for overloaded functions.



Leave a Reply 2

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


ja

ja

B

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

The INLINE pragma specifys that a subprogram call is, or is not, to be inlined. Inlining replaces a subprogram call (to a subprogram in the same program unit) with a copy of the called subprogram.
——
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.

NO
Specifies that the subprogram call is not to be inlined.
——–
If the name of the subprogram (identifier) is overloaded (that is, if it belongs to more than one subprogram), the INLINE pragma applies to every subprogram with that name (see Example 13-2). For information about overloaded subprogram names, see Overloading PL/SQL Subprogram Names.