Why does the SqlServer optimizer get so confused with parameters?

后端 未结 9 2523
猫巷女王i
猫巷女王i 2020-12-15 12:59

I know this has something to do with parameter sniffing, but I\'m just perplexed at how something like the following example is even possible with a piece of technology that

9条回答
  •  心在旅途
    2020-12-15 13:22

    Is every query reference to the parameter comparing it with int values, without functions and without casting?

    Can you increase the specificity of any expressions using the parameter to make the use of multifield indexes more likely?

提交回复
热议问题