explain analyzing a query inside an sql stored procedure - Mailing list pgsql-general

From Havasvölgyi Ottó
Subject explain analyzing a query inside an sql stored procedure
Date
Msg-id 005f01c598e4$02db2950$8200a8c0@OTTO
Whole thread Raw
In response to dbf to pgsql  ("Piotr" <hokah@wp.pl>)
List pgsql-general
Hi,

Is there any easy way to explain analyze a query, which is inside an sql
stored procedure? I could of course copy the query out of the procedure, and
explain analyze it but this is a slower process. I would do this with a lot
of procedures, that's why it should be fast.

create function myquery() returns setof record as $$
    select * from mytable; --this is a set returning query
$$ language sql;

explain analyze select * from myquery();

For me this shows function scan, and not the plan of the query itself.

Best Regards,
Otto



pgsql-general by date:

Previous
From: "Alejandro D. Burne"
Date:
Subject: pgsql-odbc list problem
Next
From: Oluwatope Akinniyi
Date:
Subject: Trigger Variables