sql-optimize

Solid

Use when a SQL query or migration is slow and you need to find the bottleneck and propose indexes or rewrites that make it fast.

AI & Automation 1 stars 0 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
10
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
36
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# SQL Optimize ## When to use Invoke this skill for slow queries, missing indexes, full table scans, or N+1 patterns in reports and APIs. ## Steps 1. Get the query plan (`EXPLAIN ANALYZE`) and locate the most expensive node. 2. Check whether filters and joins use indexed columns. 3. Propose covering indexes or a query rewrite (join order, CTEs, pagination). 4. Flag N+1 loops that should become a single batched query. 5. Give the before/after plan and the expected impact, with a migration. ## Examples - "Why is this JOIN so slow?" - "Suggest indexes for this report query" ## References Always confirm with EXPLAIN on real data; an index that is never selective can hurt writes more than it helps reads.

Details

Author
NSBen
Repository
NSBen/skillfoundry
Created
4 days ago
Last Updated
4 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category