github avatar

Sql Optimization

The sql-optimization skill provides comprehensive query tuning and database performance analysis for developers working with SQL databases including MySQL, PostgreSQL, SQL Server, and Oracle. It analyzes execution plans, recommends indexing strategies, optimizes joins and subqueries, and offers pagination and batch operation guidance to improve database performance. The skill solves performance bottlenecks by identifying inefficient query patterns and providing specific, database-agnostic optimization techniques with concrete code examples.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
23
skills.sh installs
16K
GitHub stars
41K
last updated
Aug 21, 2026

Install

$ npx -y skills add github/awesome-copilot --skill sql-optimization --agent claude-code

Installs into .claude/skills of the current project.

Files

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

-- ❌ 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

-- ❌ BAD: Poor indexing strategy
CREATE INDEX idx_user_data ON users(email, first_name, last_name, created_at);

Sponsors

Details

Repository
github.com/github/awesome-copilot
Categories
Backend & APIs, DevOps & CI/CD, Git & Pull Requests, AI & Agent Building, Debugging, Productivity & Planning, Automation & Workflows, Databases

More from github/awesome-copilot

All 318
1google avatarcloud-sql-basicsgoogle/skillsThis file generates or explains Cloud SQL resources. Use this file when the user asks to create a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL S15.7Kskills.sh installs
2github avatarsql-code-reviewgithub/awesome-copilotUniversal SQL code review assistant that performs comprehensive security, maintainability, and code quality analysis across all SQL databases (MySQL, PostgreSQL15.6Kskills.sh installs
3clerk avatarclerk-chrome-extension-patternsclerk/skillsChrome Extension auth with @clerk/chrome-extension -- popup/sidepanel setup, syncHost for OAuth/SAML via web app, createClerkClient for service workers and head14.9Kskills.sh installs
4clerk avatarclerk-androidclerk/skillsImplement Clerk authentication for native Android apps using Kotlin and Jetpack Compose with clerk-android source-guided patterns. Use for prebuilt AuthView/Use14.9Kskills.sh installs
5clerk avatarclerk-astro-patternsclerk/skillsAstro patterns with Clerk — middleware, SSR pages, island components, API routes, static vs SSR rendering. Triggers on: astro clerk, clerk astro middleware, ast14.8Kskills.sh installs
6clerk avatarclerk-nuxt-patternsclerk/skillsNuxt 3 auth patterns with @clerk/nuxt - middleware, composables, server API routes, SSR. Triggers on: Nuxt auth, useAuth composable, clerkMiddleware Nuxt, serve14.4Kskills.sh installs