Skip to main content

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 profileRecommendation style
Very large tablesTighter analyze thresholds so planner statistics refresh before row drift becomes too large.
Medium tablesModerate per-table thresholds when stale statistics are visible.
Small tablesUsually 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.