This walks you through the full cycle of SQL optimization: running EXPLAIN ANALYZE to spot sequential scans, adding indexes where they matter, and rewriting queries to avoid common traps like SELECT * or wrapping indexed columns in functions. It includes a TypeScript benchmarking script that compares query performance across iterations, plus examples of composite indexes, covering indexes, and when to use EXISTS over IN. The practical bits are solid: you get actual EXPLAIN output with timing breakdowns, before-and-after comparisons showing 990x speedups, and a slow query detection setup using pg_stat_statements. If you're chasing down slow endpoints or just want to understand why your JOIN is crawling, this gives you the patterns and tooling to measure what actually changed.
npx -y skills add patricio0312rev/skills --skill sql-query-optimizer --agent claude-codeInstalls into .claude/skills of the current project.
Select a file.
prisma/skills
supabase/agent-skills
syahiidkamil/software-engineer-ai-agent-atlas
neondatabase/agent-skills
firebase/agent-skills
firebase/agent-skills