Oracle performance optimization operation 18: determines whether to use full table scan or index. oracle Performance Optimization

Source: Internet
Author: User

Oracle performance optimization operation 18: determines whether to use full table scan or index. oracle Performance Optimization

Like all tips, the last trick will go back to the starting point. Finally, let's discuss whether to create an index, maybe it is faster to perform a full table scan.

In most cases, full table scanning may lead to more input and output from physical disks. However, full table scanning may sometimes run faster because of high degree of parallelism.

If the queried table has no order at all, a query with the number of returned records less than 10% may read most of the data blocks in the table. Using indexes will increase the query efficiency.

However, if the table is in a very sequential order, if the number of queried records is greater than 40%, the full table scan may be faster.

Therefore, the general principle of an index range scan is:

1) index range scanning should be used to read only queries that are less than 40% of the number of table records in the original sorting table.

Conversely, full table scan is recommended for queries that read more than 40% of the table records.

2) index range scanning should be used for unordered tables that only read less than 7% of the number of table records.

Conversely, full table scan is recommended for queries that read more than 7% of the table records.

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.