201.Examine the following PL/SQL block:
SET SERVEROUTPUT ON
SET LONG 10000 ECLARE report clob;
BEGIN report := DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE();
DBMS_OUTPUT.PUT_LINE(report);
END;
Which statement describes the effect of the execution of the above PL/SQL block?
A. The plan baselines are verified with the SQL profiles.
B. All fixed plan baselines are converted into nonfixed plan baselines.
C. All the nonaccepted SQL profiles are accepted into the plan baseline.
D. The nonaccepted plans in the SQL Management Base are verified with the existing plan baselines.
Answer: D
答案解析:
参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_spm.htm#ARPLS68168
参考:http://blog.csdn.net/rlhua/article/details/16369811
EVOLVE_SQL_PLAN_BASELINE Function
This function evolves SQL plan baselines associated with one or more SQL statements. A SQL plan baseline is evolved when one or more of its non-accepted plans is changed to an accepted plan or plans. If interrogated by the user (parameter verify
= 'YES
'), the execution performance of each non-accepted plan is compared against the performance of a plan chosen from the associated SQL plan baseline. If the non-accepted plan performance is found to be better than SQL plan baseline performance, the non-accepted plan is changed to an accepted plan provided such action is permitted by the user (parameter commit
= 'YES').
The second form of the function employs a plan list format.
Table 136-9 EVOLVE_SQL_PLAN_BASELINE Function Parameters
Parameter | Description |
---|---|
| SQL statement identifier. Unless |
| Plan identifier. Default |
| A list of plan names. Each plan in the list can belong to same or different SQL statement. |
| Time limit in number of minutes. This applies only if
|
| Specifies whether to execute the plans and compare the performance before changing non-accepted plans into accepted plans. A performance verification involves executing a non-accepted plan and a plan chosen from corresponding SQL plan baseline and comparing their performance statistics. If non-accepted plan shows performance improvement, it is changed to an accepted plan.
|
| Specifies whether to update the
|
A CLOB
containing a formatted text report showing non-accepted plans in sequence, each with a possible change of its ACCEPTED
status, and if verify = 'YES
' the result of their performance verification.