From 65e3ea76417d1baab158fd8305ebed4f43141c7a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 13 Dec 2008 19:13:44 +0000 Subject: Increase the default value of default_statistics_target from 10 to 100, and its maximum value from 1000 to 10000. ALTER TABLE SET STATISTICS similarly now allows a value up to 10000. Per discussion. --- doc/src/sgml/config.sgml | 4 ++-- doc/src/sgml/perform.sgml | 4 ++-- doc/src/sgml/ref/alter_table.sgml | 4 ++-- doc/src/sgml/ref/analyze.sgml | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index cf99ba2c85f..86ccac9448c 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,4 +1,4 @@ - + Server Configuration @@ -2133,7 +2133,7 @@ archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows not had a column-specific target set via ALTER TABLE SET STATISTICS. Larger values increase the time needed to do ANALYZE, but might improve the quality of the - planner's estimates. The default is 10. For more information + planner's estimates. The default is 100. For more information on the use of statistics by the PostgreSQL query planner, refer to . diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml index be5ec9f2c2e..aea529552c6 100644 --- a/doc/src/sgml/perform.sgml +++ b/doc/src/sgml/perform.sgml @@ -1,4 +1,4 @@ - + Performance Tips @@ -562,7 +562,7 @@ SELECT attname, n_distinct, most_common_vals FROM pg_stats WHERE tablename = 'ro column-by-column basis using the ALTER TABLE SET STATISTICS command, or globally by setting the configuration variable. - The default limit is presently 10 entries. Raising the limit + The default limit is presently 100 entries. Raising the limit might allow more accurate planner estimates to be made, particularly for columns with irregular data distributions, at the price of consuming more space in pg_statistic and slightly more diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 61cd403fcfd..b19c89f4211 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -1,5 +1,5 @@ @@ -142,7 +142,7 @@ where action is one of: This form sets the per-column statistics-gathering target for subsequent operations. - The target can be set in the range 0 to 1000; alternatively, set it + The target can be set in the range 0 to 10000; alternatively, set it to -1 to revert to using the system default statistics target (). For more information on the use of statistics by the diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml index ad851405856..418082e6d93 100644 --- a/doc/src/sgml/ref/analyze.sgml +++ b/doc/src/sgml/ref/analyze.sgml @@ -1,5 +1,5 @@ @@ -132,10 +132,10 @@ ANALYZE [ VERBOSE ] [ table [ ( ANALYZE is run, even if the actual table contents did not change. This might result in small changes in the planner's estimated costs shown by - . In rare situations, this - non-determinism will cause the query optimizer to choose a - different query plan between runs of ANALYZE. To - avoid this, raise the amount of statistics collected by + . + In rare situations, this non-determinism will cause the planner's + choices of query plans to change after ANALYZE is run. + To avoid this, raise the amount of statistics collected by ANALYZE, as described below. @@ -148,7 +148,7 @@ ANALYZE [ VERBOSE ] [ table [ ( ). The target value sets the maximum number of entries in the most-common-value 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 + is 100, but this can be adjusted up or down to trade off accuracy of planner estimates against the time taken for ANALYZE and the amount of space occupied in pg_statistic. In particular, setting the -- cgit v1.2.3