diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2014-10-15 18:50:13 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2014-10-15 18:50:13 -0400 |
commit | 90063a7612e2730f7757c2a80ba384bbe7e35c4b (patch) | |
tree | 2e106aa9065c7f8f5e9e1937252118a19c64da9d /doc/src/sgml/ref/explain.sgml | |
parent | 076d29a1eed5fe51fb2b25b98fcde9dd7c506902 (diff) | |
download | postgresql-90063a7612e2730f7757c2a80ba384bbe7e35c4b.tar.gz postgresql-90063a7612e2730f7757c2a80ba384bbe7e35c4b.zip |
Print planning time only in EXPLAIN ANALYZE, not plain EXPLAIN.
We've gotten enough push-back on that change to make it clear that it
wasn't an especially good idea to do it like that. Revert plain EXPLAIN
to its previous behavior, but keep the extra output in EXPLAIN ANALYZE.
Per discussion.
Internally, I set this up as a separate flag ExplainState.summary that
controls printing of planning time and execution time. For now it's
just copied from the ANALYZE option, but we could consider exposing it
to users.
Diffstat (limited to 'doc/src/sgml/ref/explain.sgml')
-rw-r--r-- | doc/src/sgml/ref/explain.sgml | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/doc/src/sgml/ref/explain.sgml b/doc/src/sgml/ref/explain.sgml index 72776a0fdef..f14a58dfc63 100644 --- a/doc/src/sgml/ref/explain.sgml +++ b/doc/src/sgml/ref/explain.sgml @@ -145,8 +145,8 @@ ROLLBACK; <para> Include information on the estimated startup and total cost of each plan node, as well as the estimated number of rows and the estimated - width of each row. Also, include the time spent planning the query, - if available. This parameter defaults to <literal>TRUE</literal>. + width of each row. + This parameter defaults to <literal>TRUE</literal>. </para> </listitem> </varlistentry> @@ -291,8 +291,7 @@ EXPLAIN SELECT * FROM foo; QUERY PLAN --------------------------------------------------------- Seq Scan on foo (cost=0.00..155.00 rows=10000 width=4) - Planning time: 0.114 ms -(2 rows) +(1 row) </programlisting> </para> @@ -312,8 +311,7 @@ EXPLAIN (FORMAT JSON) SELECT * FROM foo; "Total Cost": 155.00, + "Plan Rows": 10000, + "Plan Width": 4 + - }. + - "Planning Time": 0.114 + + } + } + ] (1 row) @@ -332,8 +330,7 @@ EXPLAIN SELECT * FROM foo WHERE i = 4; -------------------------------------------------------------- Index Scan using fi on foo (cost=0.00..5.98 rows=1 width=4) Index Cond: (i = 4) - Planning time: 0.073 ms -(3 rows) +(2 rows) </programlisting> </para> @@ -353,8 +350,7 @@ EXPLAIN (FORMAT YAML) SELECT * FROM foo WHERE i='4'; Total Cost: 5.98 + Plan Rows: 1 + Plan Width: 4 + - Index Cond: "(i = 4)" + - Planning Time: 0.073 + Index Cond: "(i = 4)" (1 row) </programlisting> @@ -386,7 +382,6 @@ EXPLAIN SELECT sum(i) FROM foo WHERE i < 10; Aggregate (cost=23.93..23.93 rows=1 width=4) -> Index Scan using fi on foo (cost=0.00..23.92 rows=6 width=4) Index Cond: (i < 10) - Planning time: 0.088 ms (3 rows) </programlisting> </para> @@ -410,7 +405,7 @@ EXPLAIN ANALYZE EXECUTE query(100, 200); Index Cond: ((id > $1) AND (id < $2)) Planning time: 0.197 ms Execution time: 0.225 ms -(5 rows) +(6 rows) </programlisting> </para> |