What problem does it solve? Writing and tuning PostgreSQL queries that leverage the database's unique features is difficult, and generic SQL advice often misses PostgreSQL-specific capabilities like JSONB operators, GIN indexes, and range types, leading to slow queries and underused features. ## Core Features & Use Cases - PostgreSQL-Specific Query Patterns: Provides idiomatic SQL for JSONB operations, array types, window functions, full-text search, custom types, and range/geometric types. - Performance Tuning Guidance: Covers EXPLAIN ANALYZE interpretation, index strategies (composite, partial, covering, GIN/GiST), pg_stat_statements analysis, and connection/memory configuration. - Optimization Checklists: Supplies structured review lists for query analysis, index strategy, security, and monitoring, plus good-vs-bad pattern comparisons for pagination, aggregation, and JSON queries. - Use Case: A developer notices a slow endpoint backed by a JSONB query. Use this Skill to rewrite the query with proper JSONB operators, add a GIN index, and verify the improvement with EXPLAIN ANALYZE. ## Quick Start Ask the assistant to review and optimize your PostgreSQL query or schema, for example by requesting an index strategy and rewritten SQL for a slow JSONB lookup.