What problem does it solve?
This Skill helps diagnose and resolve slow PostgreSQL queries and suboptimal database configurations so applications run faster and more reliably under production workloads.
Core Features & Use Cases
- EXPLAIN analysis & query tuning: Interpret EXPLAIN/EXPLAIN ANALYZE output, identify sequential scans, and recommend query rewrites or join optimizations.
- Indexing & partitioning strategies: Advise on B-tree, GIN, GiST, BRIN, partial and expression indexes, covering indexes for index-only scans, and range/list/hash partitioning for very large tables.
- Production configuration & pooling: Recommend memory, autovacuum, WAL, checkpoint, and connection pooling (PgBouncer/Supavisor) settings for OLTP and analytical workloads.
- Operational diagnostics: Use pg_stat_statements and table bloat analysis to find high-impact queries, IO hotspots, and vacuuming needs.
- Use case: Improve a slow reporting endpoint by analyzing the query plan, adding a targeted partial index, and tuning work_mem and shared_buffers for the database server.
Quick Start
Use the postgresql-optimization skill to analyze an EXPLAIN ANALYZE output and get index, query, and configuration recommendations.