Re: Optional skipping of unchanged relations during ANALYZE?

From: VASUKI M <vasukianand0119(at)gmail(dot)com>
To: Christoph Berg <myon(at)debian(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Optional skipping of unchanged relations during ANALYZE?
Date: 2026-01-20 11:02:46
Message-ID: CAE2r8H7Fs-KyAEXH0j9MKW_5axFAkuhWC0htM0k03-Zw0TV9fQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for pointing that out.

On Tue, Jan 20, 2026 at 4:16 PM Christoph Berg <myon(at)debian(dot)org> wrote:

> Re: VASUKI M
> > I’m considering working on an optional mode where ANALYZE would skip
> > relations that have not been modified since their last analyze, based
> > on existing pg_stat counters (for example, mod_since_analyze = 0).
>
> Make sure that doesn't skip tables that were never analyzed before.
>
>
Yes, the intention is that SMART ANALYZE would not skip relations that have
never been analyzed before.
The skip decision is based on pg_stat entries, so relations without
existing statistics will still be analyzed normally.

I’ll make sure this behavior is clear and covered when I post the patch.

Thanks,
Vasuki M
C-DAC,Chennai

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Soumya S Murali 2026-01-20 11:09:13 Re: Allowing ALTER COLUMN TYPE for columns in publication column lists
Previous Message Amit Kapila 2026-01-20 10:59:15 Re: Logical Replication of sequences