053 Question No. 478

Source: Internet
Author: User

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_CACHEfunction of theDBMS_SPMPackage. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.