Oracle Database: Program with PL/SQL — Question 46
Examine the following SQL statement:
ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL=3;
What is the result of executing this statements?
Answer options
- A. The PL/SQL optimize level for some existing PL/SQL units will be changed as an immediate result.
- B. The PL/SQL optimize level for subsequently complied PL/SQL units will be set to 3 and inlining will be enabled.
- C. The PL/SQL optimize level for subsequently compiled PL/SQL units will be set to 3 and inlining will be disabled.
- D. This statement will fail because PLSQL_OPTIMIZE_LEVEL can only be set at the system level,
Correct answer: C
Explanation
The correct answer is C because the command sets the optimization level for future PL/SQL units to 3 while disabling inlining. Option A is incorrect as it refers to existing units, which are not affected. Option B is wrong since it states that inlining is enabled, which contradicts the nature of the command. Option D is incorrect because the statement can be executed at the session level.