November 16, 2010 at 7:21 am
Hi Guys,
If I execute the SP with same parameters logical reads are more and if i execute it as batch then
the logical reads are considerably less .What might be the reason ?
November 16, 2010 at 10:32 am
Different execution plan?
November 17, 2010 at 5:41 am
This could be a classic case of parameter sniffing.
Like Grant said at the summit, Parameter sniffing is your best friend, but can cause headaches for you at times. When you are running the SQL as a batch, you set the parameters to a local variable. But when you are running it of the SP, it uses the parameter that is passed in. This could cause a bad plan for that particular Query.
-Roy
November 17, 2010 at 5:47 am
Thanks Guys
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply