Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Stairway to SQL Server Indexes: Step 6, Bookmarks Expand / Collapse
Author
Message
Posted Monday, February 14, 2011 10:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, June 23, 2012 10:54 AM
Points: 8, Visits: 23
Comments posted to this topic are about the item Stairway to SQL Server Indexes: Step 6, Bookmarks
Post #1063693
Posted Wednesday, June 8, 2011 10:59 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 8:57 AM
Points: 7,081, Visits: 12,575
Thanks for the great article David!

From the article:

Therefore, each row in a database, at any given point in time, can be identified by three numbers; file number - page number - row number. This identifying composite of three numbers is called the row id, usually shortened to RID. Most tools that display SQL Server internals information will display these three numbers separated by colons (instead of hyphens). So the 12th row on the 77th page of file 1 would have a RID of 1:77:12.


You explained why SQL Server will use the RID as the Bookmark in a Heap's non-clustered index but how much space does the RID actually occupy on those index entries? i.e. is the RID comprised of 3 separate INTs and are they stored as such, using 12 bytes on each index entry?


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1121958
Posted Wednesday, August 3, 2011 2:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 23, 2011 2:36 AM
Points: 4, Visits: 27
I see very little of value in this article. The readers are ever so slightly better informed after reading it, but have acquired no useful information. In fact if your conclusions, or lack thereof, are to be believed no decisions should be altered based on the entire topic. As such wouldn't it have been better not to publish it and thus save us all the time spent reading it? This strikes me as the sort of irrelevant waffle published by academics that gives academia a bad name.

Before your next article please try to establish that the topic is worth reading about before writing about it.
Post #1153325
Posted Wednesday, August 3, 2011 6:00 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 8:57 AM
Points: 7,081, Visits: 12,575
opc.three (6/8/2011)
Thanks for the great article David!

From the article:

Therefore, each row in a database, at any given point in time, can be identified by three numbers; file number - page number - row number. This identifying composite of three numbers is called the row id, usually shortened to RID. Most tools that display SQL Server internals information will display these three numbers separated by colons (instead of hyphens). So the 12th row on the 77th page of file 1 would have a RID of 1:77:12.


You explained why SQL Server will use the RID as the Bookmark in a Heap's non-clustered index but how much space does the RID actually occupy on those index entries? i.e. is the RID comprised of 3 separate INTs and are they stored as such, using 12 bytes on each index entry?

I later learned the RID is 8 bytes.

http://www.sqlskills.com/blogs/paul/post/SQL-Server-2008-New-(undocumented)-physical-row-locator-function.aspx


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1153430
Posted Wednesday, August 3, 2011 6:09 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 8:57 AM
Points: 7,081, Visits: 12,575
Steve.Cornelius (8/3/2011)
I see very little of value in this article. The readers are ever so slightly better informed after reading it, but have acquired no useful information. In fact if your conclusions, or lack thereof, are to be believed no decisions should be altered based on the entire topic. As such wouldn't it have been better not to publish it and thus save us all the time spent reading it? This strikes me as the sort of irrelevant waffle published by academics that gives academia a bad name.

Before your next article please try to establish that the topic is worth reading about before writing about it.

Why so harsh Steve? It's a "Stairways" article. All writers must consider their target audience. I thought the article was a great primer on bookmarks, indexes and heaps. The three guidelines laid out regarding choosing a clustering key are critical to remember. Even veterans can use some re-enforcement of the fundamentals from time to time. I thought the article was great!


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1153436
Posted Wednesday, August 3, 2011 6:40 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, July 24, 2014 9:57 AM
Points: 50, Visits: 353

Why so harsh Steve? It's a "Stairways" article. All writers must consider their target audience. I thought the article was a great primer on bookmarks, indexes and heaps. The three guidelines laid out regarding choosing a clustering key are critical to remember. Even veterans can use some re-enforcement of the fundamentals from time to time. I thought the article was great!


+1 to that. It is a very good article and as the stairway progresses will for sure leave the audience with a sound understanding of the working of the indexes.

We have used the non clustered indexes on a heap approach for tables that are not joined with other tables and where range queries are infrequently made.
Transaction tables forming part of entity-relationships though, as a general rule of thumb, are clustered.
Post #1153463
Posted Wednesday, August 3, 2011 6:51 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, December 2, 2013 6:30 AM
Points: 346, Visits: 691
I thought the article had good information, but perhaps more attention could have been paid to the characteristics of a good key, bringing up the whole surrogate key idea--unless that's another step on the stairway?
Post #1153478
Posted Wednesday, August 3, 2011 10:33 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 10:34 AM
Points: 812, Visits: 1,077
I liked the article, but I think the "which is better" section is a little misleading. There are lots of good reasons to prefer tables with clustered indexes that were just out of scope for the article. Range data access, relationships, space management, etc.
Post #1153726
Posted Monday, August 8, 2011 4:00 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 2:30 PM
Points: 587, Visits: 2,831
Steve.Cornelius (8/3/2011)
I see very little of value in this article. The readers are ever so slightly better informed after reading it, but have acquired no useful information. In fact if your conclusions, or lack thereof, are to be believed no decisions should be altered based on the entire topic. As such wouldn't it have been better not to publish it and thus save us all the time spent reading it? This strikes me as the sort of irrelevant waffle published by academics that gives academia a bad name.

Before your next article please try to establish that the topic is worth reading about before writing about it.


Steve, I don;t understand why your first post is so negative. I have been following this series of articles and have found it most interesting on how the underlying disk structure funtions. This one added heaps to my knowledge (bad pun intended). Are you setting yourself up as "one to watch" due to extreme negativity and nastyness?



Post #1156452
Posted Tuesday, August 9, 2011 2:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 23, 2011 2:36 AM
Points: 4, Visits: 27
Are you setting yourself up as "one to watch" due to extreme negativity and nastyness?
Please don't assign such petty motivations to me. I'm not one of these shallow idiots who thinks that attention=success. Now I've wasted enough time on this already.
Post #1156583
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse