Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameterized index not optimized
Message
 
 
À
31/10/2011 16:43:51
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Indexation
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01527723
Message ID:
01527725
Vues:
27
>On one particular situation, I have a parameterized index which has an effect on the execution plan. If I have the @Field syntax in the where clause, to have it parameterized, the execution plan cannot benefit from the index we have created and goes in lookup mode. If we remove the @Field and replace that with 1, as a numeric value, as this is a boolean field, the execution plan will adjust accordingly and use the proper index.
>
>As we need to be parameterized all the way, I need to find what could be a factor in here.

You may want to start reading from this article
Parameter Sniffing

and then proceed with this article
http://www.sommarskog.se/query-plan-mysteries.html
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform