Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More on performance
Message
From
21/12/2010 15:37:19
 
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01493511
Message ID:
01493518
Views:
85
>Michel, can you post the DDL and a screen shot of the execution plan?
>
>Also, how many rows are in the tables being queried? Also, any chance of any locking going on?

Basically, it goes as follow.

Image 1 shows that my execution plan recognizes a combo index I have defined and shows it for an Index Seek. So, this one shows that it is optimized.

Image 2 shows the list of index and one of them is the one found in Image 1. So, everything is ok so far.

Image 3 shows a Key Lookup, from the same execution plan. On that one, we can see that SQL Server didn't find the related combo index I have defined. I believe it should have found it. This is the part I do not understand.

Image 4 shows the definition of the combo index which should have been picked up by the execution in Image 3. Here, we can see that we have a primary key defined as an index.

Image 5 shows the definition of the combo index, as shown in Image 4, but for the included columns. We can see that I have added the four related columns as shown in Image 3, for the Key Lookup definition. So, the index seems to be properly created. But, the execution is not showing it, thus it is not using it.

So, why is this working for an Index Seek but not for the Key Lookup. Is it possible that a Key Lookup cannot use an index I have defined?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform