Or perhaps just redirect the output to capture the results.
IE:
\o some_result_file
BEGIN;
EXPLAIN ANALYZE blah;
ROLLBACK;
However, perhaps a better thing to do is just leave out the ANALYZE as that is what causes the execution and only adds timing to the results.
Melvin Davidson
Folk Alley - All Folk - 24 Hours a day www.folkalley.com
From: Tim Uckun <timuckun@gmail.com> To: "pgadmin-support@postgresql.org" <pgadmin-support@postgresql.org> Sent: Thursday, April 9, 2015 7:13 PM Subject: [pgadmin-support] Running explain analyze in a transaction
I want to to do the following.
begin;
explain analyze blah
rollback;
If I do this I don't get the results of the analyze.
I have been resorting to commenting out the rollback and running it separately but it's a bit of a pain.