What problem does it solve?
This Skill addresses challenges in PostgreSQL database performance, query efficiency, schema design, and operational administration, ensuring databases run optimally.
Core Features & Use Cases
- Query Optimization: Analyzes and rewrites SQL queries for maximum efficiency using
EXPLAIN ANALYZE.
- Indexing Strategies: Recommends and implements appropriate index types (B-tree, GIN, GiST, BRIN) based on access patterns.
- Schema Design: Guides on normalization and denormalization trade-offs for performance.
- Database Administration: Provides advice on vacuuming, partitioning, connection pooling, and locking.
- Use Case: A developer struggling with slow-running reports can use this Skill to identify the bottleneck query, receive an optimized version, and get recommendations for new indexes to speed up data retrieval.
Quick Start
Use the postgres-expert skill to analyze the query plan for 'SELECT * FROM users WHERE created_at > ''2023-01-01'''.