From: Laurenz Albe <laurenz.albe@cybertec.at>
To: veem v <veema0000@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: When manual analyze is needed
Date: Mon, 04 Mar 2024 09:40:34 +0100
Message-ID: <fb4332fb1e8c5b0ab11e68d10b2c4c8ebf0f5aa4.camel@cybertec.at> (raw)
In-Reply-To: <CAB+=1TULKjDSBHxqSQVQstxcHshGzQUnHfp45GSESAu2qm0VKg@mail.gmail.com>
References: <CAB+=1TWsJHEfZmfUp_7KSt04dTJhAf4A3m9moiaJrS-hwCyq8Q@mail.gmail.com>
<b7aeea8a2f84a11b330137bf8849a0fc1e88ffee.camel@cybertec.at>
<CAB+=1TULKjDSBHxqSQVQstxcHshGzQUnHfp45GSESAu2qm0VKg@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, veema0000@gmail.com
Subject: Re: When manual analyze is needed
In-Reply-To: <fb4332fb1e8c5b0ab11e68d10b2c4c8ebf0f5aa4.camel@cybertec.at>
References: <CAB+=1TWsJHEfZmfUp_7KSt04dTJhAf4A3m9moiaJrS-hwCyq8Q@mail.gmail.com> <b7aeea8a2f84a11b330137bf8849a0fc1e88ffee.camel@cybertec.at> <CAB+=1TULKjDSBHxqSQVQstxcHshGzQUnHfp45GSESAu2qm0VKg@mail.gmail.com> <fb4332fb1e8c5b0ab11e68d10b2c4c8ebf0f5aa4.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox