- Environments where autovacuum is tuned conservatively or partially disabled
Autoanalyze runs opportunistically in the background. This proposal would allow a user to apply the same threshold logic explicitly and immediately.
A possible usage would look like: ANALYZE (MODIFIED_STATS);
I understand there is conceptual overlap with autovacuum, so I would especially appreciate feedback on:
-Whether exposing the threshold logic at SQL level makes sense architecturally
-Whether this should remain an explicit opt-in option
-Naming (e.g., MODIFIED_STATS vs SKIP_UNMODIFIED or something clearer)
-Whether the thresholds should reuse existing GUCs or accept per-command overrides
I intentionally kept this separate from MISSING_STATS_ONLY, since that option answers a different question (“are stats missing?”) while this one would answer (“have enough rows changed to justify re-analysis?”).
I would greatly appreciate thoughts before working on a prototype patch.
Thanks again for all the feedback so far — it has been very helpful ,expecting here the same.
Regards,
Vasuki M
C-DAC,Chennai
[1][
https://www.postgresql.org/message-id/CAE2r8H61ZtT4ek3JmLKDPmr7ALQ0uE9WSwwJRFHbXm0WdOJnEQ@mail.gmail.com]