SQL Server emergency? Email pinal@sqlauthority.com with URGENT in the subject line.

Parameter Sniffing Fixes Compared: Which One to Use

Parameter sniffing fixes compared on one table show a clear order, from a cheap guess to a better index. This post runs the plain procedure, a local variable, OPTIMIZE FOR UNKNOWN, a scoped setting, OPTION (RECOMPILE) and a covering index on the same skewed table, and prints the page reads of each in both call orders.

Continue Reading