Who puts the composite index in Oracle on the first column.

Source: Internet
Author: User
Who puts the composite index in Oracle on the first column. The reason for this problem is that when the column is in the front, the cost of index access is the lowest. In other words, we need to understand the structure of the B-tree index, how the database retrieves data through indexes, and the cost calculation formula for index access. In other words: Which column of the composite index is placed in front of the index?

Who puts the composite index in Oracle on the first column. The reason for this problem is that when the column is in the front, the cost of index access is the lowest. In other words, we need to understand the structure of the B-tree index. How does the Database Retrieve data through indexes and calculate the cost when accessing indexes. In other words: Which column of the composite index is placed in front of the index?

Who puts the composite index in Oracle on the first column.

The reason for this problem is that when the column is in the front, the cost of index access is the lowest.
In other words, we need to understand the structure of the B-tree index. How does the Database Retrieve data through indexes and calculate the cost when accessing indexes.

In other words:
Which column of the composite index is placed in front of the query SQL where condition: for example, staff_id = 12345 and created_time> = trunc (sysdate)
Create a composite index of statff_id and created_time. That is to say, it should be written in conjunction with the predicate (where condition) in the query statement.

The source is: oracle DBA manual database diagnosis cases and performance optimization practices. Page 216-224, Xiong Jun.


So what if you do not consider the way the predicates are written in the query statement?
For more information, see < >, Pages 86th to 87.
We recommend that you use the clustering factor as the standard when determining which column of the composite index should be the leading column.

-- If you do not quite understand this sentence, record it first.

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.