sql-pro

Analyze slow SQL queries and provide optimized rewrites with indexing recommendations.

1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/camelranchentertainment/Booking-Platform --skill sql-pro-camelranchentertainment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-pro
Source: https://github.com/camelranchentertainment/Booking-Platform/tree/main/.claude/skills/sql-pro
Command: npx skills add https://github.com/camelranchentertainment/Booking-Platform --skill sql-pro-camelranchentertainment

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Optimizes SQL queries, designs robust database schemas, and troubleshoots performance bottlenecks to accelerate data-driven applications. It helps you diagnose slow queries, craft efficient joins and aggregations, and plan migrations between PostgreSQL, MySQL, SQL Server, and Oracle.

Core Features & Use Cases

  • Query optimization: rewrite slow queries using set-based patterns, window functions, and CTEs to improve execution plans.
  • Execution plan analysis: interpret EXPLAIN/ANALYZE results across dialects and propose indexing or rewriting strategies.
  • Schema design & migration: design efficient schemas, guide normalization decisions, and assist with migrations and dialect adaptations.
  • Benchmarking & reporting: compare before/after performance and document recommendations for teams and audits.

Quick Start

Rewrite a slow query into an optimized version and provide indexing guidance.

Frequently Asked Questions about sql-pro

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

FAQPage Schema
How do I optimize a slow SQL query and figure out which indexes to add?

To optimize a slow SQL query, you rewrite it using set-based patterns, window functions, and CTEs to improve the execution plan, then add concrete indexing recommendations to accelerate data retrieval and resolve performance bottlenecks.

How do I analyze an execution plan to troubleshoot database performance issues?

Analyzing an execution plan involves interpreting EXPLAIN or ANALYZE results to identify bottlenecks in your SQL query, which then guides specific indexing or rewriting strategies to improve overall database performance.

Can I use this approach to migrate SQL queries between PostgreSQL, MySQL, SQL Server, and Oracle?

Yes, query optimization and schema design can be made portable across PostgreSQL, MySQL, SQL Server, and Oracle, ensuring the rewritten SQL remains efficient while adapting to specific dialect requirements during migration.

What is the best way to design a robust database schema for data-driven applications?

Designing a robust database schema requires guiding normalization decisions and structuring efficient joins and aggregations, which together accelerate data-driven applications and prevent performance bottlenecks.

How do I benchmark and report before and after SQL query optimization results?

Benchmarking SQL query optimization involves comparing before and after performance metrics to document the expected impact, generating reports that provide concrete justification for teams and compliance audits.