SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Events
Classes
About Us
Login / Register
Subscribe RSS Feed 

Idera SQL Check

Understanding RID Lookups in SQL Query Plans

RID Lookups are one of two types of bookmark lookup operations that are performed in query plans (the other is a key lookup). Join SQL tuning guru Grant Fritchey for a quick and insightful view into the basics of a RID lookup.

Duration:
1 mins 37 secs
Skill Level:
100
Rating:
4.26 out of 5
Publish Date:
September 09, 2008
Understanding RID Lookups in SQL Query Plans You must be logged in to view this video.  
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Grant Fritchey
I'm currently working for FM Global, an industry leading engineering & insurance company, as a DBA. I've done development of large scale applications in languages such as VB, C# and Java. I've worked in SQL Server from the hoary days of 6.0. My nickname at work is the "The Scary DBA." I even have an official name plate with it. I wear it proudly. I was awarded a Microsoft MVP in April of '09.

References

There are no downloads or recommended reading links for this video

Comments
Jason Horner on 12/23/2008
The begin of the video seemed to cut-in without an intro. It would be nice to see the alternative scenario where you resolve a bookmark lookup by adding a covering index. If all of you tables are heaps that would indeed qualify you as the scary DBA ;)

Dennis Allen on 12/23/2008
This level of information is not easy to come by, and greatly appreciated knowledge sharing! Thank you.

Dennis Allen on 12/23/2008
This level of information is not easy to come by, and greatly appreciated knowledge sharing! Thank you.

Javier Correa on 12/26/2008
How can i enhance a query plan with rid lookup??

Marco Francisco on 12/28/2008
Very nice video and explanation. I think it just missed to say what should we do to improve query... It is by creating a clustered index? Wasn't clearly answered in the video.

Andy Warren on 12/29/2008
There are two options; one is to create a covering index (index contains all columns in the select), or to create/move the clustered index so that once the row(s) is found, no additional look up is needed.

hades on 12/29/2008
Recently I found in my organization Indexes Composed with low cardinal values Such as a Boolean Type True or false. Create Clustered Index MyClusteredIndex on MyTable (ID,Avalaible) {ID is CLustered and Available is Boolean True or false}. is this a good Practice I would assume is not but maybe I'm missing Something.

Andy Warren on 12/30/2008
I wouldnt say it always makes sense, but if your ID column is reasonably (or totally) unique adding the bit column doesnt hurt anything - sorta. You're adding another byte to each non-clustered index that probably isn't needed/useful. Definitely want to avoid indexing just bit columns.

Grant Fritchey on 12/30/2008
I agree with Andy. It really depends on how the indexes are used. In general I wouldn't add columns to the cluster that don't directly affect the use of the cluster itself since all the data is stored with the cluster anyway. Any indexes on a boolean just won't get used under most circumstances (although I don't doubt you'll see scans against them, but that's not a good thing). I'd suggest dropping them entirely, or depending on the needs of the queries being run against the table, combining them with some other set of columns. But I'd still shy away from the clustered index in this case.

Philip on 1/5/2010
Video not found

Neil Laslett on 2/25/2010
More please!

John Miceli on 5/24/2011
Could we have a more complicated example and some examples of how to fix the problem. I'm sure there is more than one way to address the issue (ie: a large table that already has too many indexes on it).

Eric on 5/24/2011
Awesome video, I really needed it! My experience and knowledge with execution plans is sadly lacking.



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions