Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/ref/analyze.sgml`
cbceaac6b06453e3e4a8ffb956f7edb983829883388247160000000100000fb7
 processes all partitions of specified partitioned tables,
      this option will cause <command>ANALYZE</command> to skip all
      partitions if there is a conflicting lock on the partitioned table.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>BUFFER_USAGE_LIMIT</literal></term>
    <listitem>
     <para>
      Specifies the
      <glossterm linkend="glossary-buffer-access-strategy">Buffer Access Strategy</glossterm>
      ring buffer size for <command>ANALYZE</command>.  This size is used to
      calculate the number of shared buffers which will be reused as part of
      this strategy.  <literal>0</literal> disables use of a
      <literal>Buffer Access Strategy</literal>.   When this option is not
      specified, <command>ANALYZE</command> uses the value from
      <xref linkend="guc-vacuum-buffer-usage-limit"/>.  Higher settings can
      allow <command>ANALYZE</command> to run more quickly, but having too
      large a setting may cause too many other useful pages to be evicted from
      shared buffers.  The minimum value is <literal>128 kB</literal> and the
      maximum value is <literal>16 GB</literal>.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">boolean</replaceable></term>
    <listitem>
     <para>
      Specifies whether the selected option should be turned on or off.
      You can write <literal>TRUE</literal>, <literal>ON</literal>, or
      <literal>1</literal> to enable the option, and <literal>FALSE</literal>,
      <literal>OFF</literal>, or <literal>0</literal> to disable it.  The
      <replaceable class="parameter">boolean</replaceable> value can also
      be omitted, in which case <literal>TRUE</literal> is assumed.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">size</replaceable></term>
    <listitem>
     <para>
      Specifies an amount of memory in kilobytes.  Sizes may also be specified
      as a string containing the numerical size followed by any one of the
      following memory units: <literal>B</literal> (bytes),
      <literal>kB</literal> (kilobytes), <literal>MB</literal> (megabytes),
      <literal>GB</literal> (gigabytes), or <literal>TB</literal> (terabytes).
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">table_name</replaceable></term>
    <listitem>
     <para>
      The name (possibly schema-qualified) of a specific table to
      analyze.  If omitted, all regular tables, partitioned tables, and
      materialized views in the current database are analyzed (but not
      foreign tables).  If <literal>ONLY</literal> is specified before
      the table name, only that table is analyzed.  If <literal>ONLY</literal>
      is not specified, the table and all its inheritance child tables or
      partitions (if any) are analyzed.  Optionally, <literal>*</literal>
      can be specified after the table name to explicitly indicate that
      inheritance child tables (or partitions) are to be analyzed.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">column_name</replaceable></term>
    <listitem>
     <para>
      The name of a specific column to analyze. Defaults to all columns.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1>
  <title>Outputs</title>

   <para>
    When <literal>VERBOSE</literal> is specified, <command>ANALYZE</command> emits
    progress messages to indicate which table is currently being
    processed.  Various statistics about the tables are printed as well.
   </para>
 </refsect1>

 <refsect1>
  <title>Notes</title>

  <para>
   To analyze a table, one must ordinarily have the <literal>MAINTAIN</literal>
   privilege on the table.  However, database owners are allowed to
   analyze all tables in their databases, except shared catalogs.
   <command>ANALYZE</command>

Title: ANALYZE Parameters and Outputs
Summary
This section details the parameters available for the ANALYZE command, including VERBOSE, SKIP_LOCKED, BUFFER_USAGE_LIMIT, boolean values, size specifications, table names, and column names. It also describes the outputs generated by ANALYZE, particularly when the VERBOSE option is used, which provides progress messages and table statistics.