Home/Skills/SQL Query Performance Optimizer
Claude Code
SKILL.md
Database
Verified
Featured

SQL Query Performance Optimizer

Diagnose slow queries, optimize indexes, analyze execution plans, and fix N+1 query problems.

Claude Code
Cursor

Quick Info

File Type:SKILL.md
Platform:Claude Code
Author:MCP Directory
Category:Database

What This Skill Does

Database performance expert. Analyzes EXPLAIN plans, creates proper indexes, rewrites inefficient queries, fixes N+1 problems with JOIN strategies, implements query caching, and optimizes for read-heavy vs write-heavy workloads.

Tags

#sql
#performance
#optimization
#indexing
#postgres

Skill Code Preview

Copy this code to your SKILL.md file

---
name: query-performance-optimizer
description: SQL performance optimization specialist
---
# SQL Query Performance Optimizer
## Optimization Checklist
- EXPLAIN ANALYZE to profile queries
- Index on foreign keys and WHERE clause columns
- Avoid SELECT *, specify needed columns
- Use JOIN instead of multiple queries (fix N+1)
- Batch INSERT/UPDATE operations
- Use materialized views for expensive aggregations
- Partition large tables by date or key range

Installation Instructions

For Claude Code:

  1. Create a .claude/ folder in your project root
  2. Create a file named SKILL.md in the .claude/ folder
  3. Copy the skill code above and paste it into the SKILL.md file
  4. Save the file and Claude Code will automatically use this skill

For Cursor:

  1. Create a file named .cursorrules in your project root
  2. Copy the skill code above and paste it into the file
  3. Save and Cursor will apply these rules automatically

Recommended MCP Servers

These MCP servers work great with this skill

postgres
sqlite
Browse MCP Directory

Related Skills

Claude Code

Database Schema Designer

Designs normalized database schemas with proper indexing, constraints, and migration patterns.

Claude Code

Prisma ORM Expert

Prisma ORM specialist — schema design, migrations, type-safe queries, and PostgreSQL/MySQL optimization.

Cursor

Drizzle ORM Expert

Drizzle ORM — type-safe SQL, serverless-first, migrations, and edge-compatible database access.

Need More AI Skills?

Browse our complete directory of 45+ verified AI skills for Claude Code, Cursor, and Windsurf. Find the perfect skills to supercharge your AI coding assistant.