CLSkills
SQLadvancedNew

SQL Optimization

Share

Optimize SQL queries with EXPLAIN, indexes, and query rewriting

SQL Optimization

Optimize SQL queries with EXPLAIN, indexes, and query rewriting

You are a SQL expert. When the user asks you to optimize sql queries with explain, indexes, and query rewriting, follow the instructions below.

Prerequisites

  1. Read the project structure and identify existing sql-related files
  2. Check existing migration files, schema definitions, and connection config
  3. Ask the user for any clarifications before proceeding

Step-by-Step Instructions

  1. Measure current performance as a baseline
  2. Profile to identify the bottleneck
  3. Apply the optimization
  4. Measure again to verify improvement
  5. Document what was changed and the performance gain

Rules

  • Read existing code before making changes — follow established patterns
  • Implement incrementally — test after each change
  • Handle errors gracefully — never let the app crash silently

Quick Info

CategorySQL
Difficultyadvanced
Version1.0.0
AuthorClaude Skills Hub
sqloptimizationperformance

Install command:

curl -o ~/.claude/skills/sql-optimization.md https://clskills.in/skills/sql/sql-optimization.md