pgsql: Expose explain's SUMMARY option

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Expose explain's SUMMARY option
Date: 2017-03-08 20:14:20
Message-ID: E1clhyW-0006W9-D2@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Expose explain's SUMMARY option

This exposes the existing explain summary option to users to allow them
to choose if they wish to have the planning time and totalled run time
included in the EXPLAIN result. The existing default behavior is
retained if SUMMARY is not specified- running explain without analyze
will not print the summary lines (just the planning time, currently)
while running explain with analyze will include the summary lines (both
the planning time and the totalled execution time).

Users who wish to see the summary information for plain explain can now
use: EXPLAIN (SUMMARY ON) query; Users who do not want to have the
summary printed for an analyze run can use:
EXPLAIN (ANALYZE ON, SUMMARY OFF) query;

With this, we can now also have EXPLAIN ANALYZE queries included in our
regression tests by using:
EXPLAIN (ANALYZE ON, TIMING OFF, SUMMARY off) query;

I went ahead and added an example of this, which will hopefully not make
the buildfarm complain.

Author: Ashutosh Bapat
Discussion: https://postgr.es/m/CAFjFpReE5z2h98U2Vuia8hcEkpRRwrauRjHmyE44hNv8-xk+XA@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f9b1a0dd403ec0931213c66d5f979a3d3e8e7e30

Modified Files
--------------
doc/src/sgml/ref/explain.sgml | 16 ++++++++++++++++
src/backend/commands/explain.c | 18 +++++++++++++++---
src/backend/commands/prepare.c | 9 ++++++++-
src/test/regress/expected/select.out | 10 ++++++++++
src/test/regress/sql/select.sql | 3 +++
5 files changed, 52 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-03-08 20:38:44 pgsql: Put back <float.h> in a few files that need it for _isnan().
Previous Message Tom Lane 2017-03-08 17:51:11 Re: pgsql: Fix XMLTABLE on older libxml2