• Attached are the 2 execution plans (with and without variable). Regarding disbaling parameter sniffing, after we upgraded our databases to SQL 2008 R2 from SQL 2005 version many of our SPs were victim of Parameter sniffing and it was not possible to change all the Production SPs so we thought on disabling parameter sniffing by enabling the Trace flag.