What problem does it solve?
This Skill provides best practices and quick references for optimizing PostgreSQL database performance, schema design, indexing, and security, helping developers write more efficient and robust SQL.
Core Features & Use Cases
- Index Optimization: Quick reference for choosing the right index type (B-tree, GIN, BRIN) based on query patterns.
- Data Type Selection: Guidance on appropriate PostgreSQL data types for various use cases (IDs, strings, timestamps, money, booleans).
- Pattern Examples: Demonstrates effective patterns like composite indexes, covering indexes, partial indexes, Row Level Security (RLS), UPSERT, cursor pagination, and queue processing.
- Anti-Pattern Detection: Provides SQL queries to identify common issues like unindexed foreign keys, slow queries, and table bloat.
- Configuration Template: Offers a starting point for essential PostgreSQL configuration settings.
Quick Start
Use the postgres-patterns skill to generate an optimized composite index for a query filtering by status and sorting by creation date.