Parameter Sensitivity and Plan Reuse

Parameter sniffing, parameterization, recompilation, and cached-plan reuse.

62 associated posts60 primary posts

Performance Tuning

Optimize for… Mediocre?

Some query hints sound too good to be true. And, unfortunately, usually they aren't quite as magical as they might seem.
Frustration with unpredictable execution times
People often learn about parameter sniffing when query execution times stop being predictable. Occasionally you'll hear about a stored procedure taking much longer than normal, but the next time you look, it might be faster.

Read more about Optimize for… Mediocre? 36 comments — Join the discussion

The Use and Abuse of RECOMPILE in SQL Server (Video)

What are the costs when you ask SQL Server to recompile a statement or a stored procedure each time it runs? In this 30 minute talk Kendra Little explains the impact on query execution-- and on your SQL Server instance-- of forcing recompilation. This talk is appropriate for DBAs and Developers who have a working knowledge of execution plans in SQL Server.

Read more about The Use and Abuse of RECOMPILE in SQL Server (Video) 8 comments — Join the discussion