279th questions, 053279

Source: Internet
Author: User

279th questions, 053279

279. Identify the activities stored med as part of the Automatic SQL Tuning process in the maintenance
Window? (Choose all that apply .)
A. generating the SQL profile
B. testing and accepting the SQL profile
C. generating a list of candidate SQLs for tuning
D. adding tuned SQL plans into the SQL plan baseline
E. tuning each SQL statement in the order of importance
F. generating baselines that include candidate SQLs for tuning
Answer:ABCE




How Automatic SQL Tuning Works

Oracle Database automatically runs SQL Tuning Advisor on selected high-load SQL statements from the Automatic Workload Repository (AWR) that qualify as tuning candidates. this task, called Automatic SQL Tuning, runs in the default maintenance windows on a nightly basis. by default, automatic SQL tuning runs for at most one hour. you can customize attributes of the maintenance windows, including start and end time, frequency, and days of the week.

After automatic SQL tuning begins, the database performs the following steps:

  1. Identifies SQL candidates in the AWR for tuning

    Oracle Database analyzes statistics in AWR and generates a list of potential SQL statements that are eligible for tuning. These statements include repeating high-load statements that have a significant impact on the database.

    The database tunes only SQL statements that have an execution plan with a high potential for improvement. the database ignores recursive SQL and statements that have been tuned recently (in the last month), parallel queries, DML, DDL, and SQL statements with performance problems caused by concurrency issues.

    The database orders the SQL statements that are selected as candidates based on their performance impact. the database calculates the impact by summing the CPU time and the I/O times in AWR for the selected statement in the past week.

  2. Tunes each SQL statement individually by calling SQL Tuning Advisor

    During the tuning process, the database considers and reports all recommendation types, but it can implement only SQL profiles automatically.

  3. Tests SQL profiles by executing the SQL statement

    If a SQL profile is recommended, the database tests the new profile by executing the SQL statement both with and without the profile. if the performance improvement improves at least threefold, then the database accepts the SQL profile, but only ifACCEPT_SQL_PROFILESTask parameter is setTRUE. Otherwise, the automatic SQL tuning reports merely report the recommendation to create a SQL profile.

  4. Optionally, implements the SQL profiles provided they meet the criteria of threefold performance improvement

    The database considers other factors when deciding whether to implement the SQL profile. for example, the database does not implement a profile when the objects referenced in the statement have stale optimizer statistics. SQL profiles that have been implemented automatically show type isAUTOInDBA_SQL_PROFILESView.

    If the database uses SQL plan management, and if a SQL plan baseline exists for the SQL statement, then the database adds a new plan baseline when creating the SQL profile. as a result, the optimizer uses the new plan immediately after profile creation. see Chapter 15, "Using SQL Plan Management ".

At any time during or after the automatic SQL tuning process, you can view the results using the automatic SQL tuning report. this report describes in detail all the SQL statements that were analyzed, the recommendations generated, and the SQL profiles that were automatically implemented.

Figure 17-1 shows the steps saved med by the database during automatic SQL tuning.

Figure 17-1 Automatic SQL Tuning


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

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.