The parameter sniffing local variable trick copies a parameter into a variable so SQL Server cannot sniff it. This post measures the estimate and the page reads of a sniffed and a local variable procedure, called in both orders. It shows what the trick fixes, and what it leaves slow.
SQL SERVER – Parameter Sniffing Simplest Example
Today we will see a very simple example of the Parameter Sniffing. Let us see a very simple example of the parameter sniffing.
Removing a Bad Plan From Cache Without Clearing Everything
Remove one bad plan from cache by handle, compare narrower recompilation choices, and fix the cause so the plan stays healthy.
Catch-All Queries and Optional Parameter Plan Optimization in SQL Server 2025
Compare catch-all queries with recompilation, parameterized dynamic SQL, and SQL Server 2025 optional parameter plan optimization.
How to Set ARITHABORT ON for .NET Applications
A query that runs fast in Management Studio and slow in a .NET application often runs under two different plans, because the two connections use different ARITHABORT settings. This post shows both plans in the plan cache, measures the cost, and explains how to set ARITHABORT ON for all connections through the server’s default connection options.
Local Variable Estimates: Why the Density Vector Wins
Understand local variable estimates with skewed data, density calculations, parameter comparisons, and targeted OPTION RECOMPILE tests.
Parameter Sensitive Plans: Reading Query Variants in Query Store
Inspect query variants and dispatcher plans in Query Store, compare skewed parameter values, and read the boundaries selecting each plan.







