8000 Doc: add detail about EXPLAIN's "Disabled" property · postgres/postgres@84b8fcc · GitHub
[go: up one dir, main page]

Skip to content

Commit 84b8fcc

Browse files
committed
Doc: add detail about EXPLAIN's "Disabled" property
c01743a and later 161320b adjusted the EXPLAIN output to show which plan nodes were chosen despite being disabled by the various enable* GUCs. Prior to e222534, the disabledness of a node was only evident by a large startup cost penalty. Since we now explicitly tag disabled nodes with a boolean property in EXPLAIN, let's add some documentation to provide some details about why and when disabled nodes can appear in the plan. Author: Laurenz Albe, David Rowley Discussion: https://postgr.es/m/883729e429267214753d5e438c82c73a58c3db5d.camel@cybertec.at
1 parent 014720c commit 84b8fcc

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

doc/src/sgml/perform.sgml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,31 @@ WHERE t1.unique1 < 100 AND t1.unique2 = t2.unique2;
578578
discussed <link linkend="using-explain-analyze">below</link>.
579579
</para>
580580

581+
<para>
582+
When using the enable/disable flags to disable plan node types, many of
583+
the flags only discourage the use of the corresponding plan node and don't
584+
outright disallow the planner's ability to use the plan node type. This
585+
is by design so that the planner still maintains the ability to form a
586+
plan for a given query. When the resulting plan contains a disabled node,
587+
the <command>EXPLAIN</command> output will indicate this fact.
588+
589+
<screen>
590+
SET enable_seqscan = off;
591+
EXPLAIN SELECT * FROM unit;
592+
593+
QUERY PLAN
594+
---------------------------------------------------------
595+
Seq Scan on unit (cost=0.00..21.30 rows=1130 width=44)
596+
Disabled: true
597+
</screen>
598+
</para>
599+
600+
<para>
601+
Because the <literal>unit</literal> table has no indexes, there is no
602+
other means to read the table data, so the sequential scan is the only
603+
option available to the query planner.
604+
</para>
605+
581 4352 606
<para>
582607
<indexterm>
583608
<primary>subplan</primary>

0 commit comments

Comments
 (0)
0