Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides SQL query optimization with indexing strategies, EXPLAIN plan analysis, and N+1 fixes, including Firestore query patterns.
96% 100%+4 ptsof test cases passed
Passed 25 of 25 test cases with the skill, and 24 of 25 without it.
3 of 3 safety checks passed
207 agent runs
1 forkA fork is a copy of this skill that someone made so they could edit it for their own use. The original doesn't change.
A guide to turning slow queries into fast operations through systematic optimization, correct indexing, and query plan analysis.
-- Basic explain
EXPLAIN SELECT * FROM users WHERE email = '[email protected]';
-- With actual statistics
EXPLAIN ANALYZE
SELECT * FROM users WHERE email = '[email protected]';
-- Detailed output
EXPLAIN (ANALYZE, BUFFERS, VERBOSE)
SELECT u.*, o.order_total
FROM users u
JOIN orders o ON u.id = o.user_id
WHERE u.created_at > NOW() - INTERVAL '30 days';
| Metric | Description | Status |
|---|---|---|
Seq Scan | Scans the entire table | Bad on large tables |
Index Scan | Uses an index | Good |
Index Only Scan | Index only, no table | Best |
Hash Join | Joins large datasets | Good |
Nested Loop | Joins small datasets | Good; bad at scale |
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.