February 12, 2015 at 1:53 pm
I've a stored proc that takes date and a client number...It does bunch of updates to the same table....Interesting thing is when i execute it in a
proc, it takes about 3 and half minutes...but when i run it as a adhoc queries passing value of the parameter, it runs within in 5 secs...I'm not
understanding it...can somebody explain?
February 12, 2015 at 2:15 pm
Why don't you post the query and let us see it too?
Sigerson
"No pressure, no diamonds." - Thomas Carlyle
February 12, 2015 at 2:20 pm
It might be bad parameter sniffing. You can read about it on many articles.
For more information specific to your problem, check the following article: http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply