Re: Reporting planning time with EXPLAIN

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Stephen Frost <sfrost@snowman.net>, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>, Amit Kapila <amit.kapila16@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-01-06T01:51:39Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2016-12-28 10:29:48 -0500, Tom Lane wrote:
>> How about just saying that the existing TIMING option turns this on,

> I don't like this much - I'd like (as previously stated in [1]) to be
> able to have an actual EXPLAIN ANALYZE (COSTS off, TIMING OFF) in tests
> because that shows the number of loops, rechecks, etc.

Hmm ...

regression=# EXPLAIN (analyze, COSTS off, TIMING OFF) select * from tenk1;
                  QUERY PLAN                   
-----------------------------------------------
 Seq Scan on tenk1 (actual rows=10000 loops=1)
 Planning time: 1.075 ms
 Execution time: 2.723 ms
(3 rows)

I see your point.  OK, that's a use case not within the scope of the
original proposal, but it's a reasonable argument for having a SUMMARY OFF
option.

			regards, tom lane


Commits

  1. Expose explain's SUMMARY option

  2. Print planning time only in EXPLAIN ANALYZE, not plain EXPLAIN.