Re: document the need to analyze partitioned tables

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: document the need to analyze partitioned tables
Дата
Msg-id a36b9ef49c02bb0980b1d100222f1f6690cd39c6.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: document the need to analyze partitioned tables  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
On Wed, 2023-01-18 at 11:49 -0600, Justin Pryzby wrote:
> I tweaked this a bit to end up with:
>
> > -    Partitioned tables are not processed by autovacuum.  Statistics
> > -    should be collected by running a manual <command>ANALYZE</command> when it is
> > +    The leaf partitions of a partitioned table are normal tables and are processed
> > +    by autovacuum; however, autovacuum does not process the partitioned table itself.
> > +    This is no problem as far as <command>VACUUM</command> is concerned, since
> > +    there's no need to vacuum the empty, partitioned table.  But, as mentioned in
> > +    <xref linkend="vacuum-for-statistics"/>, it also means that autovacuum won't
> > +    run <command>ANALYZE</command> on the partitioned table.
> > +    Although statistics are automatically gathered on its leaf partitions, some queries also need
> > +    statistics on the partitioned table to run optimally.  You should collect statistics by
> > +    running a manual <command>ANALYZE</command> when the partitioned table is
> >      first populated, and again whenever the distribution of data in its
> >      partitions changes significantly.
> >     </para>
>
> "partitions are normal tables" was techically wrong, as partitions can
> also be partitioned.

I am fine with your tweaks.  I think this is good to go.

Yours,
Laurenz Albe



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mahmoud Sakr
Дата:
Сообщение: Re: Implement missing join selectivity estimation for range types
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Extracting cross-version-upgrade knowledge from buildfarm client