March 22, 2012 at 3:23 am
Hello All,
I am new to sql server,am working in sql server 2000,We are facing very strange problem.
There is a stored procedure which was running fine before but it certainly running slowly for last couple of days.
previously it used to take only 1 hour but now days it is taking more than 24 hours,though its finished successfully.I have tried some steps like rebuilding indexes in the tables and running execution plan to check where exactly it is taking time,but somehow that couldnot fix the problem.Need your help on this.
Many thanks in advance
March 22, 2012 at 4:54 am
If you would only post stored procedure code...
Without seeing the code it's impossible to advise anything concrete.
It may be due to:
1. Parameter sniffing
2. Tables require update statistics
3. Bad code
and many other things...
March 22, 2012 at 6:18 am
Just to add my $ .02, one hour is still a very long time, unless you're moving 1TB of data.
Are you sure there's no tuning opportunity in that code?
-- Gianluca Sartori
March 22, 2012 at 8:40 am
That is what we are trying now,like we are trying to avoid "not in " instead of that I am trying to use left outer join,but still I am not getting the desired result,and also we have more complicated stored procedures and those are running fine,so it seems may be some thing wrong with the db.
March 22, 2012 at 8:42 am
can you post the definition of the stored proc, the definitions of the tables and indexes used by the proc so that people can take a look at it and determine if it is the DB or the proc which is the problem?
March 22, 2012 at 11:29 am
I think you might want to post the execution plan as well.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply