Database index memo

Source: Internet
Author: User

Database indexes generally use the B-number Structure

Clustered index:

Because the order of the actual data is the same as that of the index (the data in the data page is arranged consecutively and in order)
Therefore, when performing a range search such as field> XX and field <xx2, you can read multiple data pages based on the preceding and following values.
It is much more economical to read Io data than non-clustered indexes. The retrieved data in the range is continuous data segments, and the data is relatively concentrated than non-clustered indexes.

Non-clustered index:

Composite Index:

Based on the index creation interface and the single-field index structure, the structure of the composite index can be inferred to be

Sort indexes by State ASC, endtime DESC, and employeid DESC first. Therefore, the best performance is available for where statements containing State.

References

Http://www.cnblogs.com/KissKnife/archive/2009/03/30/1425534.html
Http://www.cnblogs.com/Leo_wl/archive/2011/01/17/1937268.html
Http://www.cnblogs.com/wq3if2in/archive/2009/04/02/1428068.html
Http://blog.csdn.net/HEROWANG/article/details/4987066

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.