Hi there. I have a stored procedure which when invoked using EXEC in Sql Server Management Studio takes about 20 minutes to even start.
The EXEC command includes two input variables which hold XML strings of data, so I'm not sure if this would impact the startup at all?
Once the procedure does start, it finishes quite quickly but I can't see what is causing it to wait for so long to begin processing.
I have included debug statements within the stored procedure so I can see what step may be causing the bottle neck, but it doesn't even try to reach the first of these debug statements for a very long time so it just appears to hang for no reason, then it kicks off and all is good.
Any idea(s) on what causing the stored procedure to be inactive please? Is there some state in Sql Server that acts like a thread wait or the such?
Any help will be most welcome.
Thank you.
The EXEC command includes two input variables which hold XML strings of data, so I'm not sure if this would impact the startup at all?
Once the procedure does start, it finishes quite quickly but I can't see what is causing it to wait for so long to begin processing.
I have included debug statements within the stored procedure so I can see what step may be causing the bottle neck, but it doesn't even try to reach the first of these debug statements for a very long time so it just appears to hang for no reason, then it kicks off and all is good.
Any idea(s) on what causing the stored procedure to be inactive please? Is there some state in Sql Server that acts like a thread wait or the such?
Any help will be most welcome.
Thank you.
Comment