Re: Capturing EXPLAIN ANALYZE for a query without discarding the normal result set

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Cole <davejohncole(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Capturing EXPLAIN ANALYZE for a query without discarding the normal result set
Date: 2014-01-14 03:14:20
Message-ID: 27998.1389669260@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dave Cole <davejohncole(at)gmail(dot)com> writes:
> It would be really cool if you could direct the EXPLAIN ANALYZE output to a
> temporary table so that the query being analyzed could execute normally.

What happens if the current transaction rolls back?

If you want noninvasive explain data, contrib/auto_explain offers
a solution right now. The info goes to the postmaster log, which is
perhaps less convenient than a temp table for interactive use, but
it doesn't have the rollback problem --- and you can capture data
about queries issued by a live application, without hacking the app.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2014-01-14 03:17:17 Re: Disallow arrays with non-standard lower bounds
Previous Message Marti Raudsepp 2014-01-14 03:13:09 Re: Capturing EXPLAIN ANALYZE for a query without discarding the normal result set