478.Identify the direct sources from where SQL plans can is loaded into the SQL plan baselines.
(Choose.)
A. Cursor Cache
B. Stored Outline
C. SQL Tuning Set
D. Automatic Workload Repository (AWR) snapshots
Answer: AC
You can evolve an existing SQL plan baseline by manually loading plans from the GKFX SQL area or from a SQL tuning s ET. When you manually load plans to a SQL plan baseline, the database adds these loaded plans as accepted plans
15.2.1.2.1Loading plans from SQL Tuning sets and AWR snapshots
to load plans from a SQL tuning set, use The load_plans_from_sqlset
function of The DBMS_SPM
package. The following example loads the plans stored in the SQL tuning set Named tset1
:
declare My_plans Pls_integer; BEGIN My_plans: = dbms_spm. Load_plans_from_sqlset (sqlset_name = ' tset1 '); end;/
To load plans from Automatic Workload Repository (AWR), load the plans stored in AWR snapshots into a SQL tuning set befor e using the LOAD_PLANS_FROM_SQLSET
function as described.
15.2.1.2.2Loading plans from the Shared SQL area
To load plans from the shared SQL area, use theLOAD_PLANS_FROM_CURSOR_CACHE
function of theDBMS_SPM
Package. In the following example, Oracle Database loads the plans located in the shared SQL area for the SQL statement identified By itssql_id
:
DECLARE My_plans Pls_integer; BEGIN My_plans: = dbms_spm. Load_plans_from_cursor_cache (sql_id = ' 99twu5t2dn5xd '); end;/
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
053 Question No. 478