sql-query-optimizer

Analyze SQL execution plans and recommend indexes and rewrites to optimize queries.

Updated Jan 24, 2026
One-click install
npx skills add https://github.com/Camilo8902/GabyCosmetics --skill sql-query-optimizer-camilo8902
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-query-optimizer
Source: https://github.com/Camilo8902/GabyCosmetics/tree/main/.claude/skills/sql-query-optimizer
Command: npx skills add https://github.com/Camilo8902/GabyCosmetics --skill sql-query-optimizer-camilo8902

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @prisma/client, perf_hooks, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses slow-performing SQL queries that lead to application slowdowns and poor database performance.

Core Features & Use Cases

  • EXPLAIN Plan Analysis: Interprets query execution plans to identify bottlenecks.
  • Index Recommendations: Suggests optimal indexes to speed up data retrieval.
  • Query Rewrites: Provides alternative SQL syntaxes for better efficiency.
  • Performance Benchmarking: Measures query speed before and after optimization.
  • Use Case: A user has a slow-running report that queries a large database table. They can use this Skill to analyze the query, identify missing indexes or inefficient joins, and receive optimized SQL code to improve performance.

Quick Start

Analyze the provided SQL query using the sql-query-optimizer skill to identify performance bottlenecks and suggest optimizations.

Frequently Asked Questions about sql-query-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze a slow SQL query using an EXPLAIN plan?

You analyze a slow SQL query by interpreting its EXPLAIN execution plan to identify performance bottlenecks such as table scans or inefficient joins, revealing exactly why the database query runs slowly.

What is the best way to optimize database performance for large tables?

The best way to optimize database performance for large tables is by recommending optimal indexes and providing query rewrites, which directly address slow data retrieval times and execution bottlenecks.

Can I benchmark SQL query speed before and after optimization?

Yes, you can benchmark SQL query speed before and after optimization to measure performance improvements, comparing execution times to verify that the suggested indexes and query rewrites increased efficiency.

Do I need Prisma client to tune my SQL queries effectively?

You need Prisma client as a dependency to tune SQL queries effectively within this specific environment, alongside performance hooks to measure and benchmark the execution speed of your database operations.

Why does my database performance suffer during large report generation?

Database performance suffers during large report generation because of missing indexes or inefficient join strategies in the SQL query, which forces the database to perform slow full table scans instead of targeted data retrieval.