December 5, 2007 at 6:30 am
I have a SP with a query on a 2 mil table
The SP takes input parameters used by the query
If I run the SP code in Query Analyzer window , setting values to the parameters, I get results in 1 sec.
If I try to run the SP with the same parameters ,it doesn't complete - keeps running.
SQL Profiler shows SP:CacheRemove event - sql server seems to be busy to free-up memory
Any suggestions to get this SP running ?
Thanks
December 10, 2007 at 10:37 am
check your query plans - view estimated plans, not actual. I'd give best guess your proc is table scanning not using an index seek - index to suit.
( could also be parameter sniffing )
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply