What problem does it solve?
Provides concise, actionable PostgreSQL guidance to reduce slow queries, eliminate indexing and schema anti-patterns, and improve security and maintainability for production databases.
Core Features & Use Cases
- Indexing Guidance: Recommendations for b-tree, GIN, BRIN, composite, covering, and partial indexes to match common query patterns.
- Schema and Type Best Practices: Advice on choosing data types, timestamp handling, ID strategies, and boolean/monetary field design.
- Operational Checks and Anti-Patterns: Diagnostic queries and configuration suggestions to detect unindexed foreign keys, slow statements, and table bloat.
- Use Case: Optimize an orders table with frequent WHERE and range queries by recommending composite or partial indexes, schema tweaks, and configuration tuning to lower latency.
Quick Start
Use the postgres-patterns skill to analyze a slow SQL query and recommend specific index changes, schema adjustments, and configuration settings to reduce execution time.