Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Microsoft SQL Server
Versions des environnements
SQL Server:
SQL Server 2012
>The execution plan suggests to create an index. So, I create it. Now, when I view the execution plan, I see it does not complain anymore. However, when looking at the execution plan, it does not use the index it suggested. If I remove that index, the execution plan wants it. I create it, it does not use it. What's up here?
Indexes are based upon statistics. If the index is not there, the statistic is missing. Apparently adding the index lets the optimizer conclude not to use the index because the cost is too high. It could not draw that conclusion without the index because then the statistics were missing
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement