Hi,
Whenever I write a stored procedure I call a generic stored procedure INS_DEBUG_LOG before each statement, this generic stored procedure writes to a Debug log table which holds the last statement called and the time it was started (when debugging is switched on). This usually helps me when a particular statement is taking a long time to run.
Hope this helps!
Pete
Peter Gadsby
Business Intelligence Consultant
www.hgconsult.co.uk