sql-pro

Optimize SQL queries and schema designs across multiple relational database systems.

9|2|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/stephanj/claude-code-collections --skill sql-pro-stephanj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-pro
Source: https://github.com/stephanj/claude-code-collections/tree/main/skills/sql-pro
Command: npx skills add https://github.com/stephanj/claude-code-collections --skill sql-pro-stephanj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses performance bottlenecks in database-driven applications and simplifies the design of complex, scalable database schemas.

Core Features & Use Cases

  • Query Optimization: Analyzes execution plans to tune slow queries using CTEs, window functions, and indexing strategies.
  • Schema Architecture: Provides best practices for normalization, foreign key management, and temporal data handling.
  • Performance Tuning: Offers actionable advice on partitioning, materialized views, and dialect-specific optimizations for PostgreSQL, MySQL, SQL Server, and Oracle.

Quick Start

Invoke the sql-pro skill to analyze the execution plan and suggest index improvements for the provided slow-running query.

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 in production databases?

Optimize slow SQL queries by analyzing execution plans and applying indexing strategies, CTEs, and window functions. This targets query tuning across PostgreSQL, MySQL, SQL Server, and Oracle to resolve performance bottlenecks in production environments.

What is the best way to design a scalable database schema?

Design scalable database schemas using normalization, foreign key management, and temporal data handling. This provides architecture best practices for high-performance data structures to support efficient query execution and application growth.

Does SQL optimization support PostgreSQL and MySQL dialects?

SQL optimization supports PostgreSQL, MySQL, SQL Server, and Oracle dialects. It delivers dialect-specific performance tuning, including partitioning strategies and materialized views tailored to each relational database management system.

How do I use execution plans to tune database performance?

Use execution plans to identify bottlenecks and tune database performance by implementing targeted indexing and advanced SQL patterns. Analyzing plans guides the optimization of complex queries for scalable data architecture.

When should I use recursive CTEs and window functions?

Use recursive CTEs and window functions when optimizing complex SQL queries requiring advanced data aggregation and hierarchical processing. These advanced SQL patterns enable efficient query execution without external application logic.

What are the limitations of database partitioning for query optimization?

Database partitioning limitations depend on the specific RDBMS dialect and schema architecture. While partitioning improves performance for large datasets, it requires careful execution plan analysis to ensure it does not negatively impact complex query performance.