Why architecture matters here
Index-only scans fail on stale VM + non-covering index. Architecture matters because index + VM + VACUUM compose.
Advertisement
The architecture: every piece explained
The top strip is basics. Query. Covering index. Visibility map. Index-only scan.
The middle row is mechanics. Fallback to heap. VACUUM. INCLUDE clause. Cost model.
The lower rows are ops. Bloat impact. Metrics. Ops — index design + VACUUM tuning.
Advertisement
End-to-end flow
End-to-end: query on covered index. Planner sees covering index + estimates VM coverage. Scans index. VM confirms page all-visible. Returns from index tuple. If VM stale, falls back to heap check per row.