Re: document the need to analyze partitioned tables
От
Laurenz Albe
Тема
Re: document the need to analyze partitioned tables
Дата
Msg-id
b44a25a7b28d6c47712564d62045e5f6312e52e2.camel@cybertec.at
Ответ на
Re: document the need to analyze partitioned tables (Bruce Momjian)
Список
Дерево обсуждения
document the need to analyze partitioned tables Justin Pryzby <pryzby@telsasoft.com>
Re: document the need to analyze partitioned tables Justin Pryzby <pryzby@telsasoft.com>
Re: document the need to analyze partitioned tables Tomas Vondra <tomas.vondra@enterprisedb.com>
Re: document the need to analyze partitioned tables Justin Pryzby <pryzby@telsasoft.com>
Re: document the need to analyze partitioned tables Tomas Vondra <tomas.vondra@enterprisedb.com>
Re: document the need to analyze partitioned tables Robert Haas <robertmhaas@gmail.com>
Re: document the need to analyze partitioned tables Justin Pryzby <pryzby@telsasoft.com>
Re: document the need to analyze partitioned tables Tomas Vondra <tomas.vondra@enterprisedb.com>
Re: document the need to analyze partitioned tables Laurenz Albe <laurenz.albe@cybertec.at>
Re: document the need to analyze partitioned tables Nathan Bossart <nathandbossart@gmail.com>
Re: document the need to analyze partitioned tables Bruce Momjian <bruce@momjian.us>
Re: document the need to analyze partitioned tables Justin Pryzby <pryzby@telsasoft.com>
Re: document the need to analyze partitioned tables Bruce Momjian <bruce@momjian.us>
Re: document the need to analyze partitioned tables Laurenz Albe <laurenz.albe@cybertec.at>
Re: document the need to analyze partitioned tables Justin Pryzby <pryzby@telsasoft.com>
Re: document the need to analyze partitioned tables Laurenz Albe <laurenz.albe@cybertec.at>
Re: document the need to analyze partitioned tables Bruce Momjian <bruce@momjian.us>
Re: document the need to analyze partitioned tables David Rowley <dgrowleyml@gmail.com>
Re: document the need to analyze partitioned tables Laurenz Albe <laurenz.albe@cybertec.at>
Re: document the need to analyze partitioned tables David Rowley <dgrowleyml@gmail.com>
Re: document the need to analyze partitioned tables Laurenz Albe <laurenz.albe@cybertec.at>
Re: document the need to analyze partitioned tables Bruce Momjian <bruce@momjian.us>
Re: document the need to analyze partitioned tables Laurenz Albe <laurenz.albe@cybertec.at>
Re: document the need to analyze partitioned tables Bruce Momjian <bruce@momjian.us>
Re: document the need to analyze partitioned tables Laurenz Albe <laurenz.albe@cybertec.at>
Re: document the need to analyze partitioned tables Bruce Momjian <bruce@momjian.us>
Re: document the need to analyze partitioned tables Laurenz Albe <laurenz.albe@cybertec.at>
Re: document the need to analyze partitioned tables Bruce Momjian <bruce@momjian.us>
Re: document the need to analyze partitioned tables David Rowley <dgrowleyml@gmail.com>
Re: document the need to analyze partitioned tables Daniel Gustafsson <daniel@yesql.se>
Re: document the need to analyze partitioned tables Bruce Momjian <bruce@momjian.us>
Re: document the need to analyze partitioned tables Laurenz Albe <laurenz.albe@cybertec.at>
Re: document the need to analyze partitioned tables Bruce Momjian <bruce@momjian.us>
Re: document the need to analyze partitioned tables Laurenz Albe <laurenz.albe@cybertec.at>
Re: document the need to analyze partitioned tables Bruce Momjian <bruce@momjian.us>
Re: document the need to analyze partitioned tables Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Re: document the need to analyze partitioned tables Daniel Gustafsson <daniel@yesql.se>
Re: document the need to analyze partitioned tables Zhihong Yu <zyu@yugabyte.com>
On Fri, 2023-09-29 at 22:34 -0400, Bruce Momjian wrote: > Very good point! Updated patch attached. Thanks! Some small corrections: > diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml > index 9cf9d030a8..be1c522575 100644 > --- a/doc/src/sgml/maintenance.sgml > +++ b/doc/src/sgml/maintenance.sgml > @@ -861,10 +861,16 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu > > > > - Partitioned tables are not processed by autovacuum. Statistics > - should be collected by running a manual ANALYZE when it is > - first populated, and again whenever the distribution of data in its > - partitions changes significantly. > + Partitioned tables do not directly store tuples and consequently > + autovacuum does not VACUUM them. (Autovacuum does ... does not VACUUM or ANALYZE them. Perhaps it would be shorter to say "does not process them" like the original wording. > + perform VACUUM on table partitions just like other Just like *on* other tables, right? > + tables.) Unfortunately, this also means that autovacuum doesn't > + run ANALYZE on partitioned tables, and this > + can cause suboptimal plans for queries that reference partitioned > + table statistics. You can work around this problem by manually > + running ANALYZE on partitioned tables when they > + are first populated, and again whenever the distribution of data in > + their partitions changes significantly. > > > Yours, Laurenz Albe
В списке pgsql-hackers по дате отправления
От: Gurjeet Singh
Дата: