SQL Optimization Series (ii)-Do not modify the SQL source code, how to let SQL Fly?

Source: Internet
Author: User
Tags prepare

look for poor performance SQL Statement

To optimize SQL statements with poor performance in the database, first we need to find the poor performance SQL statements.

The following describes if you use the tool SQL Tuning Expert Pro for Oracle to find SQL from the SGA and awr.

SQL automatic optimization tool SQL Tuning Expert Pro for Oracle

Download: https://tosska.com/tosska-sql-tuning-expert-pro-tse-pro-for-oracle-download-free-trial/

Product Description: https://tosska.com/tosska-sql-tuning-expert-pro-tse-pro-for-oracle/

I. Finding from the SGA

1. Open the software Tosska SQL Tuning Expert Pro for Oracle;

2. Connect to the database;

3. Click the + sign on the right of advise Indexes;

4. In the Extract SQL window, SQL is found by default from the SGA.

. At this point you can choose the filter criteria for SQL, sort by and number of SQL bars.

For example, look for the slowest 100 SQL statements in the SGA.

5. Click the Extract SQL button and the slowest 100 SQL in the SGA is queried.

6. If you want to recommend the best index for the 100 SQL found, click the OK button;

If you want to optimize each of the 100 SQL found, you can select one SQL, right-click, select Copy SQL, save the SQL text to the file. Prepare for tuning SQL in tune SQL.

Two. Find from AWR

1. Open the software Tosska SQL Tuning Expert Pro for Oracle;

2. Connect to the database;

3. Click the + sign on the right of advise Indexes;

4. In the Extract SQL window, select Find SQL from AWR.

You can now choose which time period of SQL to find out.

For example, the CPU is very busy at 11:00 on May 14, so I want to find the SQL that 10:00-12:00 runs.

5. Click the Extract SQL button and the 10:00–12:00 SQL in AWR May 14 is queried.

6. If you want to recommend the best index for the 100 SQL found, click the OK button;

If you want to optimize each of the 100 SQL found, you can select one SQL, right-click, select Copy SQL, save the SQL text to the file. Prepare for tuning SQL in tune SQL.

SQL Optimization Series (i)-Do not modify the SQL source code, how to let SQL Fly?

SQL Optimization Series (ii)-Do not modify the SQL source code, how to let SQL Fly?

SQL Optimization Series (iii)-Do not modify the SQL source code, how to let SQL Fly?

SQL Optimization Series (iv)-Do not modify the SQL source code, how to let SQL Fly?

SQL Optimization Series (ii)-Do not modify the SQL source code, how to let SQL Fly?

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.