sql-pro

Analyze SQL execution plans and optimize queries across PostgreSQL, MySQL, SQL Server, and Oracle.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/lamb92009/claude-skills --skill sql-pro-lamb92009
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-pro
Source: https://github.com/lamb92009/claude-skills/tree/main/sql-pro
Command: npx skills add https://github.com/lamb92009/claude-skills --skill sql-pro-lamb92009

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SQL performance issues hinder applications when slow queries, suboptimal execution plans, and improper indexing inflate latency and resource usage.

Core Features & Use Cases

  • Schema analysis and normalization guidance to support efficient queries.
  • Execution plan analysis, indexing strategy design, and query rewriting for performance improvements.
  • Use Case: Optimize a complex join-heavy report query across PostgreSQL/MySQL/SQL Server by applying CTEs, window functions, and appropriate indexes to achieve sub-second response times.

Quick Start

Run an initial EXPLAIN ANALYZE on a slow query and implement the recommended indexing and rewrite strategies.

Frequently Asked Questions about sql-pro

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

FAQPage Schema
How do I optimize slow SQL queries using execution plans?

To optimize slow SQL queries, run an EXPLAIN ANALYZE execution plan and apply the recommended indexing and query rewriting strategies. This structured workflow includes schema analysis, design, optimization, and verification to reduce latency and resource usage.

Does this SQL query tuning approach work with PostgreSQL and MySQL?

Yes, this SQL query tuning approach works with PostgreSQL, MySQL, SQL Server, and Oracle. It diagnoses execution plans and applies indexing strategies across these specific database platforms to achieve peak performance.

What is the best way to tune a complex join-heavy report query?

The best way to tune a complex join-heavy report query is by applying CTEs, window functions, and appropriate indexes. This query rewriting technique alongside execution plan analysis improves response times to sub-second levels.

Why does my SQL query have high latency and resource usage?

High latency and resource usage in SQL queries often stem from suboptimal execution plans, slow queries, and improper indexing. Diagnosing these issues through execution plan analysis and indexing strategy design resolves the performance bottlenecks.

When do I need to rewrite SQL queries for performance improvements?

You need to rewrite SQL queries for performance improvements when EXPLAIN plans reveal suboptimal execution paths. Applying CTEs, window functions, and appropriate indexes corrects inefficient joins and reduces inflated query latency.