On Mon, 4 Mar 2024 at 09:42, Laurenz Albe <laurenz.a...@cybertec.at> wrote:

>
> The only things that require manual ANALYZE are
>
> 1. partitioned tables (autoanalyze will collect statistics on the
>    partitions, but not the partitioned table itself)
>
>
So the partitioned table stats is nothing but the rolledover stats of all
the partitions. As you mentioned, autoanalyze only works for child
partitions but not the partition tables, so does it mean we have to
schedule some jobs manually(through some scheduletr like pg_cron) to
analyze these partitioned tables at certain time intervals to keep those up
to date for partitioned tables? And won't that scan all the child
partitions again to have the stats aggregated/rolled over from all the
child partitions level to the table level?

Reply via email to