mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Instead of having a configure-time DEFAULT_ATTSTATTARGET, store -1 in
attstattarget to indicate 'use the default'. The default is now a GUC variable default_statistics_target, and so may be changed on the fly. Along the way we gain the ability to have pg_dump dump the per-column statistics target when it's not the default. Patch by Neil Conway, with some kibitzing from Tom Lane.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.46 2002/07/12 18:43:12 tgl Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.47 2002/07/31 17:19:50 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@@ -218,6 +218,8 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
|
||||
This form
|
||||
sets the per-column statistics-gathering target for subsequent
|
||||
<xref linkend="sql-analyze" endterm="sql-analyze-title"> operations.
|
||||
The target can be set in the range 0 to 1000; alternatively, set it
|
||||
to -1 to revert to using the system default statistics target.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/analyze.sgml,v 1.8 2002/04/23 02:07:15 tgl Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/analyze.sgml,v 1.9 2002/07/31 17:19:51 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@@ -157,7 +157,9 @@ ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ (<rep
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The extent of analysis can be controlled by adjusting the per-column
|
||||
The extent of analysis can be controlled by adjusting the
|
||||
<literal>default_statistics_target</> parameter variable, or on a
|
||||
column-by-column basis by setting the per-column
|
||||
statistics target with <command>ALTER TABLE ALTER COLUMN SET
|
||||
STATISTICS</command> (see
|
||||
<xref linkend="sql-altertable" endterm="sql-altertable-title">). The
|
||||
@@ -165,8 +167,8 @@ ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ (<rep
|
||||
list and the maximum number of bins in the histogram. The default
|
||||
target value is 10, but this can be adjusted up or down to trade off
|
||||
accuracy of planner estimates against the time taken for
|
||||
<command>ANALYZE</command> and the
|
||||
amount of space occupied in <literal>pg_statistic</literal>.
|
||||
<command>ANALYZE</command> and the amount of space occupied
|
||||
in <literal>pg_statistic</literal>.
|
||||
In particular, setting the statistics target to zero disables collection of
|
||||
statistics for that column. It may be useful to do that for columns that
|
||||
are never used as part of the WHERE, GROUP BY, or ORDER BY clauses of
|
||||
|
||||
Reference in New Issue
Block a user