Which two statements are true in this scenario?

Examine the section of code taken from a PL/SQL program:
PROCEDURE p1 (x PLS_INTEGER) IS
… …
PRAGMA INLINE (p1, ‘NO’);
x:= p1(1) + p1(2) + 17; — Call 1

x:= p1(3) + p1(4) + 17; — Call 2
Call 1 and Call 2 are the comments for distinguishing the code. The PLSQL_OPTIMIZE_LEVEL
parameter is set to 3. Which two statements are true in this scenario? (Choose two.)

Examine the section of code taken from a PL/SQL program:
PROCEDURE p1 (x PLS_INTEGER) IS
… …
PRAGMA INLINE (p1, ‘NO’);
x:= p1(1) + p1(2) + 17; — Call 1

x:= p1(3) + p1(4) + 17; — Call 2
Call 1 and Call 2 are the comments for distinguishing the code. The PLSQL_OPTIMIZE_LEVEL
parameter is set to 3. Which two statements are true in this scenario? (Choose two.)

A.
The calls to the P1 procedure are not inlined in the section commented as Call 1.

B.
The calls to the P1 procedure might be inlined in the section commented as Call 2.

C.
The calls to the P1 procedure are inlined in both the sections commented as Call 1 and Call 2.

D.
The calls to the P1 procedure are never inlined in both the sections commented as Call 1 and Call 2.



Leave a Reply 5

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


Nat

Nat

It is said PLSQL_OPTIMIZE_LEVEL is set to 3.
It forces inlining in both cases.

dames

dames

A,B
When PLSQL_OPTIMIZE_LEVEL is set to 3, the pragma can only be used
to override inlining of the calls in the statement that immediately follows it.

Leo Yu

Leo Yu

Thanks dames for your clarification.

Oista88

Oista88

Logically there is only one possible answer – A and B