Group: pgsql.sql


Subject: EXPLAIN ANALYZE inside functions
From: Sabin Coanda
Date: 11/19/2007 3:17:08 PM
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

Subject: EXPLAIN ANALYZE inside functions
From: Sabin Coanda
Date: 11/19/2007 4:48:20 PM
> > 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