Re: vacuumdb --analyze-in-stages

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Euler Taveira <euler(at)eulerto(dot)com>, "nikolai(dot)berkoff" <nikolai(dot)berkoff(at)pm(dot)me>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: vacuumdb --analyze-in-stages
Date: 2021-10-18 23:34:25
Message-ID: CAKFQuwbZjSji05khF1dH5_v36PhcuaAjasdM7Ohk47bzpi8inA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Mon, Oct 18, 2021 at 4:02 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
wrote:

> On 2021-Oct-18, Euler Taveira wrote:
>
> > On Fri, Oct 8, 2021, at 6:33 AM, nikolai.berkoff wrote:
> > > Running --analyze-in-stages on a database with statistics causes the
> > > statistics to become significantly worse before they are improved.
> > > This could be made clearer in the documentation.
> >
> > I think the paragraph you modified *already* stated that usefulness of
> > --analyze-in-stages (newly populated from a restored dump or by
> pg_upgrade). I
> > don't think your change is an improvement for --analyze-in-stages
> description.
> > If you read the previous paragraph, it explains _how_ (3 stages of
> ANALYZE with
> > different settings) and _why_ (produce usable statistics faster).
>
> Yeah, but it doesn't say that the initial stats target (1) is the worst
> value you could possibly have.
> [...]
> 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...

Beyond that maybe adjust the procedure description to include a comment
that we don't actually skip tables that already have a higher statistics
target than the current pass would apply. (can we do this?)

"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."

David J.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Alvaro Herrera 2021-10-18 23:53:52 Re: vacuumdb --analyze-in-stages
Previous Message Alvaro Herrera 2021-10-18 23:02:11 Re: vacuumdb --analyze-in-stages