Lab 12 — Maintenance
Scenario
Table statistics expose live and dead tuple estimates plus vacuum and analyze history. The goal is to determine whether maintenance debt contributes to degraded plans or storage behavior.
Run the exercise
Investigate
- Compare dead tuples with table size and update activity.
- Check the recency of vacuum, autovacuum, and analyze operations.
- Distinguish stale statistics, dead tuples, and physical bloat.
- Gather stronger evidence before prescribing
VACUUM FULLor reindexing. - Explain lock, disk-space, WAL, and runtime implications of remediation.
Diagnostic question
Which table warrants deeper maintenance investigation, and what additional evidence is required before choosing a corrective operation?