sql-optimization
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');
-- ✅ good: explicit columns, meaningful aliases, CTE, range predicate
with active_customers as (
More from bmsuisse/skills
autoresearch
>
15codeunit-analyzer
>
14deslop
>
14coding-guidelines-python
>
13init-app-stack
Use this skill whenever the user wants to bootstrap, scaffold, or initialize a new full-stack app with a Vite + React + TanStack + shadcn/ui frontend and a FastAPI + Postgres backend. Triggers on requests like "create a new app", "set up a project", "scaffold a full-stack app", "init a new project", or anything involving starting a fresh React/FastAPI application from scratch.
12databricks-sql-autotuner
>
12