Re: Running explain analyze in a transaction - Mailing list pgadmin-support

From Melvin Davidson
Subject Re: Running explain analyze in a transaction
Date
Msg-id 484938569.577213.1428690732561.JavaMail.yahoo@mail.yahoo.com
Whole thread Raw
In response to Running explain analyze in a transaction  (Tim Uckun <timuckun@gmail.com>)
List pgadmin-support
What you need to do is leave off ROLLBACK until
you examine the output.

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.

Is there an easier way to do this?



pgadmin-support by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Running explain analyze in a transaction
Next
From: Tim Uckun
Date:
Subject: Re: Running explain analyze in a transaction