Re: When manual analyze is needed

From: veem v <veema0000(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: When manual analyze is needed
Date: 2024-03-04 04:46:35
Message-ID: CAB+=1TULKjDSBHxqSQVQstxcHshGzQUnHfp45GSESAu2qm0VKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 4 Mar 2024 at 09:42, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message veem v 2024-03-04 05:23:12 Re: When manual analyze is needed
Previous Message Tom Lane 2024-03-04 04:31:11 Re: When manual analyze is needed