autovacuum_analyze_scale_factor
Fraction of a table that must change before autovacuum re-collects its statistics.
- デフォルト
0.1- Range
- 0 to 100
- Restart needed
- いいえ
- Default checked on
- PostgreSQL 18
何ができるか
The trigger is autovacuum_analyze_threshold (50) + scale_factor x rows changed since the last ANALYZE.
デフォルト値
0.1. 0.1 (PostgreSQL 18).
Check the current value
SHOW autovacuum_analyze_scale_factor; SELECT setting, unit, boot_val, context, source, pending_restart FROM pg_settings WHERE name = 'autovacuum_analyze_scale_factor';
Change it
ALTER SYSTEM SET autovacuum_analyze_scale_factor = 0.02; SELECT pg_reload_conf();
No restart: reload with SELECT pg_reload_conf() or pg_ctl reload. It cannot be changed per session (context is sighup).
When to change it
For large tables whose newest rows matter most, such as time-series tables queried for 'today', where 10% change takes days and estimates go stale.
What can go wrong
Frequent ANALYZE on huge tables costs I/O; per-table settings keep it targeted.
Questions about autovacuum_analyze_scale_factor
What is the default value of autovacuum_analyze_scale_factor in PostgreSQL?
0.1. 0.1 (PostgreSQL 18).
Does changing autovacuum_analyze_scale_factor require a restart?
No. No restart: reload with SELECT pg_reload_conf() or pg_ctl reload. It cannot be changed per session (context is sighup).
When should I change autovacuum_analyze_scale_factor?
For large tables whose newest rows matter most, such as time-series tables queried for 'today', where 10% change takes days and estimates go stale.
Back to all PostgreSQL settings, or check the PostgreSQL manual for every option.
Check autovacuum_analyze_scale_factor on your own server
SQLly runs the query above against PostgreSQL and the other engines in this reference, from one desktop app on macOS, Windows and Linux.