Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

Weird Performance problem with stored procedure

$
0
0

Hi all,

I have a stored procedure which has suffered from param sniffing problems in the past, to this effect local variables have been used so that parameters wouldnt be sniffed. The problem we are now having is that the proc will randomly time out when called from the application, the application timeout used to be 30 secs, one particular part of the proc will take that long before eventually timing out, the timeout was increased to 120 seconds, this particular section will seem to use up that time before timing out, now the timeout has been increased to 300 seconds, and yet this section in the proc will use up all that time, so it seems the more we increase the timeout, the longer it runs for.

Ironically, if I run the proc by myself or any other user, it takes less than 5 seconds, one other thing that I noticed is that when the proc is called, and profiler is used to monitor it and also the XML statistics as well (the plan used), whenever it has timed out, the plan for that particular section was never generated from what I can see in profiler.

Any ideas on what could be causing this problem ?

Thanks in advance.


Viewing all articles
Browse latest Browse all 15694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>