Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/ref/explain.sgml`
5cafbfcbded56f1d110ac7d04594dea1cd1a5c8e8acc2ecc0000000100000fa1
 parameter defaults to <literal>FALSE</literal>.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>GENERIC_PLAN</literal></term>
    <listitem>
     <para>
      Allow the statement to contain parameter placeholders like
      <literal>$1</literal>, and generate a generic plan that does not
      depend on the values of those parameters.
      See <link linkend="sql-prepare"><command>PREPARE</command></link>
      for details about generic plans and the types of statement that
      support parameters.
      This parameter cannot be used together with <literal>ANALYZE</literal>.
      It defaults to <literal>FALSE</literal>.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>BUFFERS</literal></term>
    <listitem>
     <para>
      Include information on buffer usage. Specifically, include the number of
      shared blocks hit, read, dirtied, and written, the number of local blocks
      hit, read, dirtied, and written, the number of temp blocks read and
      written, and the time spent reading and writing data file blocks, local
      blocks and temporary file blocks (in milliseconds) if
      <xref linkend="guc-track-io-timing"/> is enabled.  A
      <emphasis>hit</emphasis> means that a read was avoided because the block
      was found already in cache when needed.
      Shared blocks contain data from regular tables and indexes;
      local blocks contain data from temporary tables and indexes;
      while temporary blocks contain short-term working data used in sorts,
      hashes, Materialize plan nodes, and similar cases.
      The number of blocks <emphasis>dirtied</emphasis> indicates the number of
      previously unmodified blocks that were changed by this query; while the
      number of blocks <emphasis>written</emphasis> indicates the number of
      previously-dirtied blocks evicted from cache by this backend during
      query processing.
      The number of blocks shown for an
      upper-level node includes those used by all its child nodes.  In text
      format, only non-zero values are printed.  Buffers information is
      automatically included when <literal>ANALYZE</literal> is used.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>SERIALIZE</literal></term>
    <listitem>
     <para>
      Include information on the cost
      of <firstterm>serializing</firstterm> the query's output data, that
      is converting it to text or binary format to send to the client.
      This can be a significant part of the time required for regular
      execution of the query, if the datatype output functions are
      expensive or if <acronym>TOAST</acronym>ed values must be fetched
      from out-of-line storage.  <command>EXPLAIN</command>'s default
      behavior, <literal>SERIALIZE NONE</literal>, does not perform these
      conversions.  If <literal>SERIALIZE TEXT</literal>
      or <literal>SERIALIZE BINARY</literal> is specified, the appropriate
      conversions are performed, and the time spent doing so is measured
      (unless <literal>TIMING OFF</literal> is specified).  If
      the <literal>BUFFERS</literal> option is also specified, then any
      buffer accesses involved in the conversions are counted too.
      In no case, however, will <command>EXPLAIN</command> actually send
      the resulting data to the client; hence network transmission costs
      cannot be investigated this way.
      Serialization may only be enabled when <literal>ANALYZE</literal> is
      also enabled.  If <literal>SERIALIZE</literal> is written without an
      argument, <literal>TEXT</literal> is assumed.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>WAL</literal></term>
    <listitem>
     <para>
      Include information on WAL record generation. Specifically, include the
      number of records, number of full page images (fpi), the amount of WAL
      generated in bytes

Title: EXPLAIN ANALYZE Parameters Continued: Buffers, Serialize, and WAL
Summary
This section details additional parameters for the EXPLAIN command: BUFFERS, which shows buffer usage (shared, local, temp blocks, and I/O timing if track_io_timing is enabled) and is automatically included with ANALYZE; SERIALIZE, which measures the cost of converting output data to text or binary format (requires ANALYZE); and WAL, which shows information about WAL record generation (number of records, full page images, and WAL size in bytes, only available when ANALYZE is used).