Agent skill · Databases

sql-optimization

Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Provides execution plan analysis, pagination optimization, batch operations, and performance monitoring guidance.

GitHub68,948★ · +463/wk · 2 repos on radarProfile →
copilotMIT
Install
npx skills add github/awesome-copilot --skill sql-optimization --agent copilot

Same command for any agent — swap --agent for claude-code, codex, cursor.

Facts
Files in the skill folder: 1
SKILL.md size: 9 KB
Bundled scripts: none
Path: skills/sql-optimization/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 37,432 · +281 this week
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the 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. ## 🎯 Core Optimization Areas ### Query Performance Analysis ```sql -- ❌ BAD: Inefficient query patterns SELECT * FROM orders o WHERE YEAR(o.created_at) = 2024 AND o.customer_id IN ( SELECT c.id FROM customers c WHERE c.status = 'active' ); -- ✅ GOOD: Optimized query with proper indexing hints SELECT o.id, o.customer_id, o.total_amount, o.created_at FROM orders o INNER JOIN customers c ON o.customer_id = c.id WHERE o.created_at >= '2024-01-01' AND o.created_at < '2025-01-01' AND c.status = 'active'; -- Required indexes: -- CREATE INDEX idx_orders_created_at ON orders(created_at); -- CREATE INDEX idx_customers_status ON customers(status); -- CREATE INDEX idx_orders_customer_id ON orders(customer_id); ``` ### Index Strategy Optimization ```sql -- ❌ BAD: Poor indexing strategy CREATE INDEX idx_user_data ON users(email, first_name, last_name, created_at); -- ✅ GOOD: Optimized composite indexing -- For queries filtering by email fir

What's inside
Steps it walks through
  1. 🎯 Core Optimization Areas
  2. Query Performance Analysis
  3. Index Strategy Optimization
  4. Subquery Optimization
  5. 📊 Performance Tuning Techniques
  6. JOIN Optimization
  7. Pagination Optimization
  8. Aggregation Optimization
  9. 🔍 Query Anti-Patterns
  10. SELECT Performance Issues
  11. WHERE Clause Optimization
  12. OR vs UNION Optimization
  13. 📈 Database-Agnostic Optimization
  14. Batch Operations
More from awesome-copilot
All skills →
About this skill
What does the sql-optimization skill do?

Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Provides execution plan analysis, pagination optimization, batch operations, and performance monitoring guidance.

How do I install it?

Run `npx skills add github/awesome-copilot --skill sql-optimization --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From github/awesome-copilot, a repository with 37,432 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going