Index in SQL Server

Source: Internet
Author: User

In SQL Server, there are two types of indexes (clustered index and non-clustered index) in name, but there are actually three types of indexes internally.

Clustered index non-clustered index: Non-clustered index on the stack; in clustered tables, non-clustered index SQL Server indexes are generally stored in the clustered index using the B-tree. The clustered index's leaf level is the real data. That is to say, once the leaf level of the index is reached, the new record is inserted based on the correct physical location in the clustered index. The structure is as follows:

For clustered indexes on the stack, the leaf level is not data, but data pointers, and the data referred to by these pointers is not connected: The structure is as follows:

The non-clustered index of the clustered table is the same as the previous two, which are the leaf nodes ,,
He is actually a link to two clustered indexes. When he reaches the first leaf-level node, he does not reach the data, but a pointer points to the root node of another index node.

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.