Thread: EXPLAIN ANALYZE inside functions

EXPLAIN ANALYZE inside functions

From
"Sabin Coanda"
Date:
Hi there,

I'd like to rise the performance of a custom function, but I read somewhere 
I cannot use EXPLAIN ANALYZE to get the execution plan of the code from the 
function.

Do you know a workaround to do this ?

I tried to apply EXPLAIN ANALYZE statements inside my procedure hopping I 
will get some notice messages, but I got nothing :(.

TIA,
Sabin 




Re: EXPLAIN ANALYZE inside functions

From
"Sabin Coanda"
Date:
>
> Do you know a workaround to do this ?
>

I just succeeded adding the following code:

FOR rec IN EXECUTE 'EXPLAIN ANALYZE ' || sSQL LOOP       RAISE NOTICE ' - %', rec;
END LOOP;

Regards,
Sabin