PostgreSQL Patterns

•
10
•

Optimizes PostgreSQL database schema design, query performance, indexing strategies, and security policies using proven production patterns.

PostgreSQL Patterns equips developers and database administrators with battle-tested database design and query optimization guidelines based on Supabase and production-grade best practices. It delivers actionable guidance for selecting appropriate index types (B-tree, GIN, BRIN), configuring composite and covering indexes, choosing correct data types, and implementing high-performance Row Level Security (RLS) policies. Whether writing schema migrations, debugging slow SQL queries, setting up queue processing with SKIP LOCKED, or auditing table bloat and unindexed foreign keys, this skill ensures robust and efficient database operations.

Características Principales

01Data type selection rules to maximize storage efficiency and avoid common anti-patterns
02Diagnostic queries to detect unindexed foreign keys, table bloat, and slow execution plans
0310 GitHub stars
04Index cheat sheet covering B-tree, GIN, BRIN, composite, covering, and partial indexes
05Optimized Row Level Security (RLS) policies to avoid per-row execution penalties
06Production query recipes for cursor-based pagination and SKIP LOCKED job queues

Casos de Uso

01Designing performant and scalable PostgreSQL database schemas and migrations
02Troubleshooting slow queries and indexing bottlenecks using pg_stat_statements
03Implementing fast, multi-tenant Row Level Security (RLS) rules in Supabase or vanilla Postgres