Hi folks:
I see a node named "Bookmark Lookup" in my execution plan.
What does it means? It costs most among steps inside the plan. Any suggestion to optimize it?
Hi folks:
I see a node named "Bookmark Lookup" in my execution plan.
What does it means? It costs most among steps inside the plan. Any suggestion to optimize it?
It means the optimiser uses a non-clustered (NC) index first, then uses the NC->C pointer/bookmark into the clustered index (which is your data) to get more data. And yes, it's expensive usually.
You'd use a "covering index" to remove the lookup so all data part of the NC index (the link explains what I've just said above too)
You might find this free ebook from Redgate useful http://downloads.red-gate.com/ebooks/HighPerformanceSQL_ebook.zip