Re: When manual analyze is needed - Mailing list pgsql-general

From Laurenz Albe
Subject Re: When manual analyze is needed
Date
Msg-id fb4332fb1e8c5b0ab11e68d10b2c4c8ebf0f5aa4.camel@cybertec.at
Whole thread Raw
In response to Re: When manual analyze is needed  (veem v <veema0000@gmail.com>)
List pgsql-general
On Mon, 2024-03-04 at 10:16 +0530, veem v wrote:
> 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?

Something like that, yes.

> 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?

Yes.

> Additionally if a query was working fine but suddenly takes a suboptimal plan because
> of missing stats , do we have any hash value column on any performance view associated
> with the queryid which we can refer to see past vs current plans difference and identify
> such issues quickly and fix it?

Not that I know of.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: Michał Kłeczek
Date:
Subject: Re: postgres_fdw aggregate pushdown for group by with expressions
Next
From: albrecht.dress@posteo.de
Date:
Subject: Inconsistent results in timestamp/interval comparison