From: Bruce Momjian <bruce@momjian.us>
To: Vineet Naik <naikvin@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Finding out if 'vacuum --analyze-in-stages' has generated enough stats
Date: Wed, 31 Mar 2021 09:16:09 -0400
Message-ID: <20210331131609.GB11609@momjian.us> (raw)
In-Reply-To: <CADmbCiMDXsimr2b-S7HKWyOiVOWTazDhABEassUqA+e4z8UMmg@mail.gmail.com>
References: <CADmbCiMDXsimr2b-S7HKWyOiVOWTazDhABEassUqA+e4z8UMmg@mail.gmail.com>
On Wed, Mar 31, 2021 at 12:38:14PM +0530, Vineet Naik wrote:
> > This option will try to create some statistics as fast as possible, to make the database usable, and then produce full statistics in the subsequent stages.
>
> So my question is, after which stage is it ok to send traffic to the
> server without much performance impact? Also, is it possible to query
> the stats view in pg and determine if enough stats have been
> generated?
That is a very hard question to answer. Some queries have only a few
possible plans, so few or no statistics are fine. Other queries require
detailed statistics to generate efficient plans. I think you need to
set up a dummy server with no stats and try your workload on that, then
run the stages manually and test after each stage to see how the
performance is.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
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-admin@postgresql.org
Cc: bruce@momjian.us, naikvin@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Finding out if 'vacuum --analyze-in-stages' has generated enough stats
In-Reply-To: <20210331131609.GB11609@momjian.us>
* 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