Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/pgoverexplain.sgml`
0b7943a0ec2ccc2464f4577197a5401cd2dfcef47c8aed2500000001000008bb
 the <literal>DEBUG</literal> option will display the
   following fields. See <literal>PlannedStmt</literal> in
   <literal>nodes/plannodes.h</literal> for additional detail.
  </para>

  <itemizedlist>
   <listitem>
    <para>
     <literal>Command Type</literal>. For example, <literal>select</literal>
     or <literal>update</literal>.
    </para>
   </listitem>

   <listitem>
    <para>
     <literal>Flags</literal>. A comma-separated list of Boolean structure
     member names from the <literal>PlannedStmt</literal> that are set to
     <literal>true</literal>. It covers the following structure members:
     <literal>hasReturning</literal>, <literal>hasModifyingCTE</literal>,
     <literal>canSetTag</literal>, <literal>transientPlan</literal>,
     <literal>dependsOnRole</literal>, <literal>parallelModeNeeded</literal>.
    </para>
   </listitem>

   <listitem>
    <para>
     <literal>Subplans Needing Rewind</literal>. Integer IDs of subplans that
     may need to be rewound by the executor.
    </para>
   </listitem>

   <listitem>
    <para>
     <literal>Relation OIDs</literal>. OIDs of relations upon which this plan
     depends.
    </para>
   </listitem>

   <listitem>
    <para>
     <literal>Executor Parameter Types</literal>. Type OID for each executor parameter
     (e.g. when a nested loop is chosen and a parameter is used to pass a value down
     to an inner index scan). Does not include parameters supplied to a prepared
     statement by the user.
    </para>
   </listitem>

   <listitem>
    <para>
     <literal>Parse Location</literal>. Location within the query string
     supplied to the planner where this query's text can be found. May be
     <literal>Unknown</literal> in some contexts. Otherwise, may be
     <literal>NNN to end</literal> for some integer <literal>NNN</literal> or
     <literal>NNN for MMM bytes</literal> for some integers
     <literal>NNN</literal> and <literal>MMM</literal>.
    </para>
   </listitem>
  </itemizedlist>
 </sect2>

 <sect2 id="pgoverexplain-range-table">
  <title>EXPLAIN (RANGE_TABLE)</title>

  <para>
   The <literal>RANGE_TABLE</literal> option displays information from the
   plan tree specifically concerning the query's range table.

Title: EXPLAIN (DEBUG) Option in pg_overexplain Extension
Summary
The DEBUG option in pg_overexplain provides additional detailed information about query plans. It displays fields such as Command Type (e.g., select or update), Flags (a list of boolean structure members from PlannedStmt), Subplans Needing Rewind (IDs of subplans that may need rewinding), Relation OIDs (OIDs of dependent relations), Executor Parameter Types (type OIDs for executor parameters), and Parse Location (location of the query text within the supplied string). This information is intended for advanced debugging and development purposes, requiring familiarity with PostgreSQL's internal structures.