What problem does it solve? Slow queries, missing indexes, connection exhaustion, and insecure Row-Level Security policies are the most common causes of Postgres performance degradation, and they are hard to diagnose without deep database expertise. ## Core Features & Use Cases - Prioritized Rule Library: Provides performance rules across 8 categories (query performance, connection management, security & RLS, schema design, locking, data access, monitoring, advanced features), each with incorrect vs. correct SQL examples and quantified impact. - Schema Auditing: Includes a Python script that scans SQL schema files for anti-patterns such as serial primary keys, varchar(n) columns, unindexed foreign keys, and mixed-case identifiers. - Health Diagnostics: Ships a SQL script that reports cache hit ratios, unused indexes, tables needing VACUUM, and long-running queries. - Use Case: When reviewing a migration file before deployment, run the audit script to catch unindexed foreign keys and wrong data types, then apply the referenced rules to rewrite the schema with identity columns, timestamptz, and proper indexes. ## Quick Start Ask the AI to review your Postgres schema or slow query using the postgres-best-practices rules and suggest optimized SQL.