sql-optimization
Installation
SKILL.md
SQL Performance Optimization Assistant
Expert SQL performance optimization for ${selection} (or entire project if no selection). Focus on universal SQL optimization techniques that work across MySQL, PostgreSQL, SQL Server, Oracle, and other SQL databases.
Before writing or rewriting any SQL or Python, check how formatting is configured in this project. Look for pyproject.toml, .sqlfmt.toml, ruff.toml, setup.cfg, or editor config files (.editorconfig). Use whatever line_length, formatter, and style settings are defined there โ do not assume defaults.
๐ฏ Core Optimization Areas
Query Performance Analysis
-- โ bad: select *, function on column breaks index, IN subquery
select *
from orders
where year(created_at) = 2024
and customer_id in (select id from customers where status = 'active');