What problem does it solve?
This Skill helps you diagnose why a specific relational database query is slow and choose the right corrective action instead of guessing, by interpreting the query planner’s chosen execution plan.
Core Features & Use Cases
- Plan-first diagnosis with EXPLAIN/EXPLAIN ANALYZE: Identifies the most expensive plan node and checks estimated vs actual cardinalities to locate the root cause.
- Query-planner mental model and plan-node taxonomy: Interprets common plan-node types (Seq Scan, Index Scan, Bitmap Heap Scan, Nested Loop, Hash Join, Sort, Hash Aggregate, Materialize, etc.) in terms of cost and behavior.
- Response catalog tied to diagnosis: Selects the appropriate fix among query rewriting, refreshed/raised statistics (ANALYZE, statistics targets, extended statistics), index-related changes, and other operational options.
Quick Start
Use the query-optimization skill to read the output of EXPLAIN ANALYZE for your slow SQL statement and determine which plan node and diagnosis explain the runtime, then apply the matching response (rewrite, statistics, or index-related tuning).