"SQL Server" bookmarks

Source: Internet
Author: User

What is a bookmark?

Regardless of whether the table is a heap structure or a segment structure, it can be determined that each row in the table is the nth row of a page, which is also the nth page of a database file, which is the nth file of the filegroup that makes up the database, so that each line in the database can be positioned at a specified time by three digits : File Number: Page number: line number. These three numbers combine to be called RIDs. Many tool software that displays the internal structure of SQL Server will display the three numbers separated by a colon. For example, the rid of Line 12th on page 77th of document 1 is 1:77:12.

In general, the rows on the heap are not changed by location. Once they are inserted into a page, they will stay there all the time. If you want to use more rigorous technical terminology: the rows on the heap seldom move. If the rows are moved, they will leave a pointer to the location where they moved to in their original position. The rows that are organized by the clustered index can be moved, and the rows are moved when the data is changed or the index is sorted. More details will be presented in the following pages of this article series.

Because the rows on the heap move almost infrequently, the RID can uniquely identify a row. The value of the RID is not just the same, nor is the physical location of the row represented by the RID. This makes the value of the RID appropriate as a bookmark. This is also why SQL Server bookmarks for nonclustered indexes established on the heap use RIDs.

 

  

"SQL Server" bookmarks

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.