Skip to main content

Parameter Sniffing Workarounds in SQL Server 2012

Created
Active
Viewed 20 times
1 replies
0

I've encountered performance issues with stored procedures in SQL Server 2012, which I suspect are due to parameter sniffing. What are effective strategies to mitigate this problem ?

1 reply

Sorted by:
79589346
0
  • 96.4k
  • 11
  • 61
  • 95

RECOMPILE hints immediately spring to mind. Upgrading to a recent (and supported) version that allows for multiple cached plans is another.

Depending on the query, dynamic SQL, logical blocks and UNION (ALL) queries can actually also be good methods.