From: Euler Taveira <euler@eulerto.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: nikolai.berkoff <nikolai.berkoff@pm.me>
Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Subject: Re: vacuumdb --analyze-in-stages
Date: Mon, 18 Oct 2021 21:02:08 -0300
Message-ID: <3907a55d-a40f-4566-9906-150fca10f0df@www.fastmail.com> (raw)
In-Reply-To: <202110182353.6lbwp4redjd2@alvherre.pgsql>
References: <202110182353.6lbwp4redjd2@alvherre.pgsql>
On Mon, Oct 18, 2021, at 8:53 PM, Alvaro Herrera wrote:
> On 2021-Oct-18, David G. Johnston wrote:
>
> > On Mon, Oct 18, 2021 at 4:02 PM Alvaro Herrera <alvherre@alvh.no-ip.org>
> > wrote:
>
> > > Given that the first stage uses statistic target=1, running this option
> > > in a database with any stats at all is probably a bad idea.
> >
> > Add the word "only"?
> >
> > This option is only useful to analyze a database...
>
> Maybe this is sufficient, since it would drive people away from trying
> to do anything else than help upgrades with it.
+1. I like your 2nd suggestion.
"This option is only useful to analyze a database that was newly populated from
a restored dump or by <command>pg_upgrade</command>. Beware that running with
this option in a database with existing statistics may cause query optimizer
choices to become transiently worse, because of the very low statistics target
that is used in the early stages."
>
> > "Run several (currently three) stages of analyze with different
> > configuration settings, to produce usable statistics faster. The first of
> > these stages will remove any existing statistics even if they use a larger
> > statistic target configuration."
>
> .. yeah, this is another option.
We might include it too but I would suggest "replace" instead of "remove"
because it seems there won't be statistics after the first stage.
--
Euler Taveira
EDB https://www.enterprisedb.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: euler@eulerto.com, alvherre@alvh.no-ip.org, david.g.johnston@gmail.com, nikolai.berkoff@pm.me, pgsql-docs@lists.postgresql.org
Subject: Re: vacuumdb --analyze-in-stages
In-Reply-To: <3907a55d-a40f-4566-9906-150fca10f0df@www.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox