PostgreSQL Performance Engineering Problem Statement Performance problems compound. A query that takes 50ms at 1K rows takes 5s at 100K rows. This skill covers patterns for building performant database interactions from the start and fixing performance issues. --- Pattern: Query Optimization Workflow Step 1: Identify Slow Queries Step 2: Analyze Query Plan What to look for: | Warning Sign | Problem | Solution | |--------------|---------|----------| | Seq Scan on large table | Missing index | Add index | | High count | N+1 in join | Rewrite query, add index | | Sort with high cost | No index f…