Sample PostgreSQL audit report
A realistic report structure for small teams: accepted findings, evidence, operational risk, next actions, and a separate AI advisory layer.
P1: Sequential scan pressure on public.orders
Evidence: high seq_scan and seq_tup_read relative to indexed access. Recommendation: run EXPLAIN (ANALYZE, BUFFERS) on the top order lookup query before adding a composite index.
P1: Temp writes in a top query
Evidence: temp_blks_written is present on a high total_exec_time query. Recommendation: inspect sort/hash operations and test work_mem or index changes in staging first.
P2: Unused non-unique index candidate
Evidence: index size is material and idx_scan is zero. Recommendation: compare dependency and query coverage before dropping or rebuilding any index.
AI Upgrade Lab advisory
The AI section is plain text advisory only. It proposes read-only diagnostics, reversible index experiments, verification checks, and rollback notes without changing evidence-gated findings.