sql-pro

Optimize SQL queries and design database schemas across PostgreSQL, MySQL, and SQL Server.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users optimize slow SQL queries, design efficient database schemas, and troubleshoot performance bottlenecks, ensuring databases run smoothly and efficiently.

Core Features & Use Cases

  • Query Optimization: Analyzes execution plans (EXPLAIN ANALYZE) and recommends indexing strategies or query rewrites to speed up slow queries.
  • Database Schema Design: Assists in creating normalized and performant database schemas, defining tables, relationships, and constraints.
  • Performance Troubleshooting: Identifies and resolves issues like table scans, locking problems, and inefficient joins.
  • Use Case: A user has a complex SQL query that takes minutes to run. They can use this Skill to analyze the query's execution plan, identify the bottleneck (e.g., a missing index), and receive a corrected query and index creation statement.

Quick Start

Use the sql-pro skill to optimize the following SQL query: SELECT * FROM orders WHERE order_date > '2023-01-01';

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, you analyze the execution plan using EXPLAIN ANALYZE to identify bottlenecks like table scans, then apply indexing strategies or rewrite complex join logic to improve performance.

What is the best way to design a normalized database schema for performance?

Database schema design for performance involves defining normalized tables, relationships, and constraints to ensure efficient data retrieval and prevent performance degradation as your dataset scales.

Does this SQL optimization approach work with PostgreSQL, MySQL, and SQL Server?

Yes, this SQL optimization approach supports PostgreSQL, MySQL, and SQL Server by applying relational database design principles, indexing strategies, and query tuning tailored to each platform's execution plan format.

How do I troubleshoot database performance degradation and locking problems?

To troubleshoot database performance degradation, you identify and resolve issues like table scans, locking problems, and inefficient joins by interpreting execution plans and adjusting indexing or query logic.

When should I use CTEs and window functions in query tuning?

Use CTEs and window functions in query tuning to simplify complex join logic and hierarchical data aggregation, which can enhance readability and sometimes improve execution plan efficiency.

Why does my SQL query ignore indexes and perform a full table scan?

Your SQL query performs a full table scan when indexes are missing, statistics are outdated, or the query logic prevents index usage, requiring analysis of the execution plan to correct the indexing strategy.