SQL optimization principles in Oracle

Source: Internet
Author: User
1. The tested statements must be exactly the same as those in the shared pool. Variable names should be the same as 3. Rational Use of Outer Join 4. Use less layer nesting 5. Optimization steps for multi-purpose concurrent statements are generally as follows: 1. Adjust the sga area so that the sga area is optimal. 2. Optimization of SQL statements, including explain and sqltrace. Database Structure

1. The tested statements must be exactly the same as those in the shared pool. Variable names should be the same as 3. Rational Use of Outer Join 4. Use less layer nesting 5. Optimization steps for multi-purpose concurrent statements are generally as follows: 1. Adjust the sga area so that the sga area is optimal. 2. Optimization of SQL statements, including explain and SQL trace. Database Structure

1. The tested statements must be exactly the same as those in the shared pool.

2. Variable names should be as consistent as possible

3. Rational use of external connections

4. Use less multi-layer nesting

5. Multi-purpose concurrency

Statement optimization steps include:

1. Adjust the sga area so that the sga area is optimal.

2. Optimization of SQL statements, including explain and SQL trace tools

3. Database Structure Adjustment

4. Project Structure Adjustment

Statement writing experience:

1. Use indexes for large table queries

2. Use less in and exist

3. Use set operations

1. Do not convert columns in large table queries, such as To_char, to_date, and to_number.

2. Try to use an index if there is an index. The conditions that are useful for the index should be written before. If possible and necessary, create some indexes.

3. Avoid full table scan as much as possible. There are as many restrictions as possible to search for the data to be queried faster.

,

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.