码迷,mamicode.com
首页 > 其他好文 > 详细

053第478题

时间:2015-07-18 14:08:27      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:ocp

478.Identify the two direct sources from where SQL plans can be loaded into the SQL plan baselines.
(Choose two.)
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 shared SQL area or from a SQL tuning set. When you manually load plans into a SQL plan baseline, the database adds these loaded plans as accepted plans


15.2.1.2.1 Loading 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 before using theLOAD_PLANS_FROM_SQLSET function as described in this section.

15.2.1.2.2 Loading Plans from the Shared SQL Area

To load plans from the shared SQL area, use the LOAD_PLANS_FROM_CURSOR_CACHE function of the DBMS_SPM package. In the following example, Oracle Database loads the plans located in the shared SQL area for the SQL statement identified by its sql_id:

DECLARE
  my_plans PLS_INTEGER;
BEGIN
  my_plans := DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE( sql_id => ‘99twu5t2dn5xd‘);
END;
/

版权声明:本文为博主原创文章,未经博主允许不得转载。

053第478题

标签:ocp

原文地址:http://blog.csdn.net/adeline_pan/article/details/46941925

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!