Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Execution plan suggestions
Message
From
16/02/2015 15:31:59
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Microsoft SQL Server
Category:
Indexing
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01615300
Message ID:
01615430
Views:
41
>>>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
>
>So the optimizer wants the index so it knows it doesn't want the index.

It wants the statistics... which come with the index.


>There is something witty here to say about MSSQL being either like a cat or a woman... I can't decide.
Previous
Reply
Map
View

Click here to load this message in the networking platform