SQL Query Optimizer Skill for NULL-Aware Exclusions
Check NULL behavior and result parity before comparing execution plans for a rewritten exclusion query.
中文Install in Claude Code
Use your PostgreSQL test database and synthetic products and blocked IDs with explicit business rules.
- Get the complete `plugins/database/sql-query-optimizer/skills/optimizing-sql-queries` directory from the pinned GitHub commit.
- Copy it into the target project's `.claude/skills/`. Check `.claude/skills/optimizing-sql-queries/SKILL.md`, start Claude Code at the project root, and call `/optimizing-sql-queries`.
Example task
Insert products 1 and 2. Put 2 and NULL into the exclusion table. Compare NOT IN with NOT EXISTS matching by ID.What to check
The intended rule keeps product 1 and excludes product 2. The report explains how NULL affected the original query.
Original SKILL.md on GitHub · Updated
Frequently asked question
Is comparing runtime enough for a rewrite?
First verify rows, order, and edge cases, then compare plans and timing.