Oracle Performance Optimization Operations IX: masking useless indexes

Source: Internet
Author: User

Continue with the example of Oracle performance optimization Operation eight

Because there are queries involving disposalcourseflag=6 in the actual query, it would be very unwise and inefficient to use the index on that field at this point.

So in this case, we need to mask the index in a special way so that Oracle chooses the index on the other field.

For example, if the field is numeric, just after the field name of the expression, add "+ 0" for the character type and the string above: | | ""

Such as:

SELECT * from  serviceinfo where disposalcourseflag+ 0 = 6 and Workno =  ' 36 ';

However, do not screen out the index that is used, otherwise it will produce a low-efficiency full-table scan.

Oracle Performance Optimization Operations IX: masking useless indexes

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.