What problem does it solve?
This Skill addresses complex PostgreSQL performance bottlenecks, optimization challenges, and advanced database administration tasks, ensuring your database runs efficiently and reliably.
Core Features & Use Cases
- Query Optimization: Analyzes and optimizes slow-running SQL queries using
EXPLAIN ANALYZE.
- Indexing Strategies: Recommends and implements advanced indexing techniques (GIN, GiST, BRIN, partial, expression indexes) for optimal data retrieval.
- JSONB Operations: Provides expertise in optimizing JSONB column queries and indexing.
- Partitioning: Guides on implementing table partitioning for large datasets to improve query performance and manageability.
- Connection Management: Assists with tuning
max_connections and configuring PgBouncer for efficient connection pooling.
- Replication & HA: Offers insights into setting up and monitoring PostgreSQL replication for high availability.
- Use Case: A user is experiencing slow query times on a large table with JSONB data. This Skill can analyze the query plan, suggest appropriate GIN indexes for the JSONB column, and provide the SQL to create them.
Quick Start
Use the postgres-expert skill to analyze the performance of the following SQL query: SELECT * FROM users WHERE status = 'active';