Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More on performance
Message
De
21/12/2010 15:37:19
 
 
À
21/12/2010 15:16:34
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01493511
Message ID:
01493518
Vues:
86
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform