Hi,
I have got a very confusing problem.
I have a stored procedure which is internally calling a number of child sps. some among them are called in a loop too. The issue i am getting is that the sp takes more than 3 minutes to complete which is not allowable for the application, which gets time out error. I found that if i run the sp for query analyser, for the first time it gives 3 minutes, but if we run it again, the time take will get reduced to 10 seconds only. For my wonder i found that the sp takes 3 minutes for every restart of my server (or restart of sql service). I am totally clueless. Can anybody help me on what could be the root cause of the issue. Statistics or Indexes are not rebuild during restart as per my knowledge. I have found many times that performance is increasing after restart. But this is for the first time i come across such a condition. Please put some lights on this issue.
Thanks in avance..
Paps
↧