ANALYZE
operations are triggered on a table.autovacuum_analyze_threshold
.0.1
(10%). For large tables (millions of rows), consider lowering this to 0.01-0.05% to ensure more frequent statistics updates. For small, frequently updated tables, you may need even lower values.ANALYZE
operation, regardless of the scale factor.50
. For very large tables, increase this value to 100-500 to avoid excessive analyze operations. For critical small tables, you might lower it to ensure maximum plan accuracy.200000000
(200 million). Do not increase this value beyond the default. Monitor wraparound warnings and ensure autovacuum can keep up with your workload to avoid emergency vacuums.3
. For larger databases (100+ GB), increase to 5-8 workers. Monitor system resources and adjust accordingly. The optimal value depends on your CPU cores, I/O capacity, and workload characteristics.400000000
(400 million). Like autovacuum_freeze_max_age
, this should not be increased. Ensure your autovacuum configuration can handle the workload to prevent emergency operations.1min
. For busy databases with frequent updates, consider reducing to 30s
. For quieter systems, increasing to 2-5min
can reduce overhead. Monitor table bloat to find the right balance.20ms
. For systems with fast storage (SSD/NVMe), consider reducing to 10ms
or even 5ms
to allow more aggressive vacuuming. For slower systems or those with heavy read workloads, you might increase to 50ms
.autovacuum_vacuum_cost_delay
.-1
(inherits from vacuum_cost_limit
, which defaults to 200). For systems with dedicated maintenance windows, consider increasing to 1000-2000 for faster vacuum completion. For systems needing minimal impact, keep at default or lower.0.2
(20%). For heavily inserted tables, consider lowering to 0.05-0.1. For tables with mixed workloads, you might need to balance this with the standard scale factor settings.1000
. For very large tables, you might increase this to 5000-10000. For critical small tables with high insert rates, consider lowering to 500.0.2
(20%). For large tables, reduce to 0.05-0.1. For small tables, you might need even lower values. Consider table-specific settings for critical tables.50
. For larger tables, increase to 100-500. For small but frequently updated tables, you might lower this to ensure timely vacuuming.Start your journey toward a healthier PostgreSQL with pghealth.
You can explore all features immediately with a free trial β no installation required.
π Start Free Trial