Re: Optional skipping of unchanged relations during ANALYZE? - Mailing list pgsql-hackers

From VASUKI M
Subject Re: Optional skipping of unchanged relations during ANALYZE?
Date
Msg-id CAE2r8H7jVmsLaWi19ZuxmwR-8UjtN6Ejv7YmtDrPinCYtE8cUA@mail.gmail.com
Whole thread Raw
In response to Re: Optional skipping of unchanged relations during ANALYZE?  (Robert Treat <rob@xzilla.net>)
Responses Re: Optional skipping of unchanged relations during ANALYZE?
List pgsql-hackers
Hi all,

Thanks a lot for the thoughtful feedback.

The points about statistics targets and random sampling make sense. In
particular, I agree that even without data changes, re-running ANALYZE
can still be beneficial (for example after increasing
default_statistics_target or per-column targets, or simply to obtain a
different sample).

Given that, my intention is to keep this strictly as an opt-in
behavior, so that existing semantics are unchanged unless the user
explicitly requests it. In the current prototype, tables that have
never been analyzed before are not skipped, and SMART only considers
relations that already have statistics.

Regarding statistics targets, since PostgreSQL does not currently track
which target was used to collect existing statistics, SMART ANALYZE
would not attempt to account for target changes. I plan to document
this limitation clearly so users understand the trade-off when opting
into this mode [for now later will look into it].

I’ll take this feedback into account while cleaning up the patch and
documentation, and will follow up with a v1 proposal once ready.

Thanks again for the guidance.

Regards,
Vasuki M
C-DAC,Chennai

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Skipping schema changes in publication
Next
From: Chao Li
Date:
Subject: brin: Remove duplicate initialization in initialize_brin_buildstate()