What problem does it solve?
Postgres deployments suffer from slow queries, inefficient indexes, connection exhaustion, insecure row-level access, and fragile schema choices that degrade performance and risk data exposure; this Skill provides actionable, prioritized guidance to address those issues and prevent regressions.
Core Features & Use Cases
- Query performance diagnostics: interpret EXPLAIN ANALYZE output, identify sequential scans, expensive joins, and sorting bottlenecks and recommend targeted fixes.
- Indexing & schema strategy: advise on single-column, composite, partial, covering, GIN/BRIN indexes, primary key choices, partitioning, and data type selection.
- Connection and RLS guidance: recommend pooling configs, timeouts, prepared-statement patterns for pooled environments, and robust Row-Level Security policies with performance-safe patterns.
- Concurrency, maintenance, and monitoring: recommend SKIP LOCKED job patterns, advisory locks, autovacuum/analyze tuning, and queries for pg_stat_statements and pg_stat_user_tables.
- Use case example: turn an EXPLAIN ANALYZE of a slow endpoint into an ordered action plan: index changes, query rewrites, and monitoring checks to validate improvement.
Quick Start
Provide the slow SQL query and its EXPLAIN ANALYZE output and ask for index, schema, and RLS recommendations.