22-25 April 2026
SQLBits 2015

Parameter Sniffing Problem with Stored Procedures

Your stored procedure is slow in the application, but works perfect in SSMS! In this presentation it will be clarified why this happens and we will offer several solutions for this problem and discuss which solution is applicable in which scenario.
Your stored procedure is slow in the application, but works perfect in SSMS! In this presentation it will be clarified why this happens and why parameter sniffing is a problem in SQL Server stored procedures. Of course we will offer several solutions for this problem and discuss which solution is applicable in which scenario.

Speakers

Milos Radivojevic

milossql.com

Milos Radivojevic's previous sessions

When to stop tuning a query
In this session, I'll demonstrate various tuning techniques and the challenges associated with each. I will guide you through the process of tuning of a single TSQL query and help you understand when to know it's optimized enough.
 
Dealing with Very Large Tables in SQL Server
What challenges do you face when dealing with tables that are over a terabyte in size? How do you index them? What do their statistics look like? How do you update them, and how do you fight against index fragmentation? How does all of this affect the estimation of the amount of data and how to tune queries involving very large tables?
 
Parameter Sniffing Problem with Stored Procedures
Your stored procedure is slow in the application, but works perfect in SSMS! In this presentation it will be clarified why this happens and we will offer several solutions for this problem and discuss which solution is applicable in which scenario.
 
Transact SQL Performance Tips
In this session we will advice how to avoid common developer mistakes and show how bad designed queries reduce the SQL Server optimizer's capabilities for choosing an optimal execution plan.
 
TSQL Performance Tips
SQL Server optimizer doesn't use and index seek for execution of your query although the query is high selective? What is better, when and why: LIKE vs: SUBSTRING, IN vs. EXISTS, SUBQUERY vs. JOIN. Why you should not use the UPPER or LOWER functions?
 
Parameter Sniffing Problem with Stored Procedures
In this presentation it will be clarified when and why parameter sniffing is a problem in SQL Server stored procedures. Of course we will offer several solutions for this problem and discuss which solution is applicable in which scenario.
 
TSQL Performance Recommendations
In this section we will show how to avoid performance problems caused by poor query design (functions in WHERE clause, data type conversions…) and explain how local variables and parameters affect the generation of execution plan.