Vacuum threshold analysis
Autovacuum health score
A score summarizing autovacuum effectiveness. Factors include dead tuple ratios, vacuum lag, stale statistics, and running worker health. The exact weighting is intentionally not published; the UI explains the evidence behind the current score.
Stale statistics detection
When table statistics appear stale, the planner's row estimates may be wrong, leading to bad join strategies and scan choices. pocketPG may recommend per-table autovacuum_analyze_scale_factor overrides based on table size and observed drift.
| Table profile | Recommendation style |
|---|---|
| Very large tables | Tighter analyze thresholds so planner statistics refresh before row drift becomes too large. |
| Medium tables | Moderate per-table thresholds when stale statistics are visible. |
| Small tables | Usually leave defaults unless the evidence is unusually strong. |
Fix SQL
Each stale table can get a two-part fix:
-- Immediate refresh
ANALYZE "schema"."table";
-- Permanent threshold override
ALTER TABLE "schema"."table" SET (autovacuum_analyze_scale_factor = ...);
The Copy SQL button stores the SQL in a registry to avoid inline onclick injection.