Re: Multivariate MCV list vs. statistics target

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "Jamison, Kirk" <k(dot)jamison(at)jp(dot)fujitsu(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Multivariate MCV list vs. statistics target
Date: 2020-09-06 01:12:31
Message-ID: 20200906011231.GB6744@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I think the docs are inconsistent with the commit message and the code
(d06215d03) and docs should be corrected, soemthing like so:

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b135c89005..cd10a6a6fc 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7302,7 +7302,8 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
of statistics accumulated for this statistics object by
<xref linkend="sql-analyze"/>.
A zero value indicates that no statistics should be collected.
- A negative value says to use the system default statistics target.
+ A negative value says to use the maximum of the statistics targets of
+ the referenced columns, if set, or the system default statistics target.
Positive values of <structfield>stxstattarget</structfield>
determine the target number of <quote>most common values</quote>
to collect.
diff --git a/doc/src/sgml/ref/alter_statistics.sgml b/doc/src/sgml/ref/alter_statistics.sgml
index be4c3f1f05..f2e8a93166 100644
--- a/doc/src/sgml/ref/alter_statistics.sgml
+++ b/doc/src/sgml/ref/alter_statistics.sgml
@@ -101,7 +101,8 @@ ALTER STATISTICS <replaceable class="parameter">name</replaceable> SET STATISTIC
The statistic-gathering target for this statistics object for subsequent
<xref linkend="sql-analyze"/> operations.
The target can be set in the range 0 to 10000; alternatively, set it
- to -1 to revert to using the system default statistics
+ to -1 to revert to using the maximum statistics target of the
+ referenced column's, if set, or the system default statistics
target (<xref linkend="guc-default-statistics-target"/>).
For more information on the use of statistics by the
<productname>PostgreSQL</productname> query planner, refer to
--
2.17.0

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-09-06 03:04:26 Re: Range checks of pg_test_fsync --secs-per-test and pg_test_timing --duration
Previous Message David Rowley 2020-09-06 00:24:31 Re: Keep elog(ERROR) and ereport(ERROR) calls in the cold path