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...@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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to