Subject Re: [firebird-support] How can I see which query within a stored procedure execution takes the longest time?
Author Tim Ward
I lost the logging code some time ago so can't quote it I'm afraid. I defined an external table, mapped to a file, with columns for timestamp, a couple of numeric values, and a text message. Then a procedure which wrote a record to this table. Then called the procedure at points in my code where I suspected there were bottlenecks.

I haven't used this approach for a while because I found the profiling output easier to use (no need to instrument the code) and just as useful. This involves running the query

select * from mon$call_stack order by mon$call_id desc

from a PHP script once a second and (if you can be bothered) doing various post-processing on the result. The query appears to only work sometimes, and I don't know why, but it works often enough to be useful. This is Firebird 2.1.

On 13/10/2015 19:30, 'stwizard' stwizard@... [firebird-support] wrote:
 

Hi Tim,

 

Thanks for the reply.  You mentioned that you did it with a logging procedure.  Can you share what you exactly what you did to accomplish this? 

 

Mike

 

 



-- 
Tim Ward