Skip to Content
Sep 18, 2015 at 02:55 PM

Stored procedure waiting too long to start executing



We have recently migrated from ASE 15.0.3 to ASE 15.7 SP132 on Solaris 10 platform.

A 343 line stored procedure was modified to print a timestamp value at the start of the execution along with one other very minor change.

In an ISQL session with 'set flushmessage on', when this stored procedure is executed, the above timestamp value shows up after 14 minutes!

While monitoring this session with AseTune, I was expecting to see some activity in tempdb right away as it uses temporary tables extensively. Instead, I saw that the stored procedure was waiting to be scheduled.

We had a similar situation a few months back where a stored procedure called from a PERL script was taking too long to start executing. Since we were executing the stored procedure with the 'recompile' clause, Sybase Tech Support advised us to remove this clause and the problem went away. In that instance, the first display statement in the stored procedure showed up in the log after 49 minutes!

It looks like the server is mis-configured/under-configured.

Any help will be highly appreciated.

Thanks in advance,