PostgreSQL Schema Design

•
39k
•

Designs and reviews high-performance PostgreSQL schemas with best practices for data types, indexing, constraints, and partitioning.

The PostgreSQL Schema Design skill equips Claude Code with deep, production-grade expertise for architecting robust relational database schemas in PostgreSQL. It guides schema creation and optimization across proper data type selection, index strategies (B-tree, GIN, GiST, BRIN), constraint modeling, partitioning, Row-Level Security, and workload-specific performance tuning for insert-heavy and update-heavy patterns. Whether you are bootstrapping a new application data model or auditing existing tables to eliminate anti-patterns and performance bottlenecks, this skill ensures strict normalization, safe migrations, and optimal PostgreSQL feature utilization.

主要功能

01Advanced constraint modeling with foreign keys, exclusion constraints, and RLS
0239,277 GitHub stars
03Comprehensive indexing strategies including covering, partial, GIN, and GiST indexes
04Declarative table partitioning and hypertable architecture for large datasets
05PostgreSQL-specific data type optimization and anti-pattern avoidance
06Performance tuning patterns for update-heavy, insert-heavy, and upsert workloads

使用场景

01Designing high-throughput time-series, event logging, and analytical database partitions
02Architecting greenfield relational schemas for SaaS, e-commerce, and multi-tenant applications
03Auditing and refactoring legacy PostgreSQL tables to resolve query bottlenecks and bloat