I have decided to start trying to learn more about performance tuning so I decided to take a look at a query that had a high count on the execution plan. When I put that query into SSMS and look at the estimated execution plan I am seeing an index seek but also with an RID Lookup. The RID lookup has a high cost. What exactly is an RID Lookup? I have heard of a bookmark lookup but not RID.
asked May 05, 2011 at 12:38 PM in Default
A RID Lookup is a lookup into a heap table using a Row ID. The Row ID is included in a non-clustered index in order to find the rest of a table's data in the heap table. Since a heap table is a table without a clustered index and is sorted unordered a Row ID is required for the correlation.
You should really look to add a clustered index to this table. Is this an in house product or a database to a third party vendor application? I have ran into this numerous times with third party products. I have yet to come into a situation where I could not add a clustered index.
answered May 05, 2011 at 12:41 PM