home/categories/sql-databases/mathews-tom-armory-skills-sql-optimizer-skill-md
sql-databasesdatabases

sql-optimizer

Analyzes SQL queries for performance issues: missing indexes, N+1 patterns, suboptimal joins, full table scans. Interprets EXPLAIN output, detects anti-patterns, recommends indexes, and rewrites queries with detailed explanations of each optimization. Triggers on: "optimize this query", "slow query", "query performance", "add indexes", "index recommendation", "explain plan", "query plan", "N+1 query", "fix this SQL", "SQL performance", "optimize SQL", "why is this query slow", "index strategy". Use this skill when given a SQL query that needs performance analysis or optimization.

Mathews-Tom
maintainer
Mathews-Tom
Updated 4/9/2026
Stars
155
Forks
25
quick start

Installation and usage

Analyzes SQL queries for performance issues: missing indexes, N+1 patterns, suboptimal joins, full table scans. Interprets EXPLAIN output, detects anti-patterns, recommends indexes, and rewrites queries with detailed explanations of each optimization. Triggers on: "optimize this query", "slow query", "query performance", "add indexes", "index recommendation", "explain plan", "query plan", "N+1 query", "fix this SQL", "SQL performance", "optimize SQL", "why is this query slow", "index strategy". Use this skill when given a SQL query that needs performance analysis or optimization.

Installation
$ install --globalskills.sh
Usage

Once installed, you can use this skill by running the following command in your terminal:

skills use sql-optimizer