sql-pro

Optimize SQL queries and improve execution plans across major database engines.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kamushadenes/nix --skill sql-pro-kamushadenes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-pro
Source: https://github.com/kamushadenes/nix/tree/main/home/common/ai/resources/claude-code/skills/sql-pro
Command: npx skills add https://github.com/kamushadenes/nix --skill sql-pro-kamushadenes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps database teams and developers overcome slow SQL queries by delivering targeted optimizations and reliable execution plans across major engines.

Core Features & Use Cases

  • Query optimization and execution plan analysis to identify bottlenecks
  • CTEs, window functions, and advanced SQL patterns for performance
  • Index design and optimization to support hot paths
  • Cross-database considerations for PostgreSQL, MySQL, SQL Server, and Oracle
  • Use Case: When a reporting or analytics query runs slowly, rewrite it with set-based logic and appropriate indexing to reduce runtime and resource usage.

Quick Start

Ask the AI to optimize a slow query and present a plan that improves execution time while proposing index adjustments. Example: "Please optimize the following query for performance and provide recommended indexes: [your SQL here]"

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 and improve execution plans?

To optimize slow SQL queries, analyze execution plans to identify bottlenecks, rewrite queries using set-based logic, and apply appropriate index design to reduce runtime and resource usage across transactional and analytical workloads.

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

Yes, this query optimization approach works across PostgreSQL, MySQL, SQL Server, and Oracle, delivering targeted execution plan improvements and index recommendations for transactional, analytical, and data warehousing workloads on large datasets.

What is the best way to use CTEs and window functions for SQL performance?

The best way to use CTEs and window functions for SQL performance is applying them as advanced set-based query transformations to replace slow procedural logic, reducing execution time while maintaining safe query patterns for large datasets.

How do I design indexes to support hot paths in my database?

Design indexes for hot paths by analyzing execution plans to identify high-impact access patterns, then apply index optimization recommendations that support query performance without requiring specific deployment changes to your database environment.

Can I optimize reporting queries without making specific deployment changes?

Yes, you can optimize reporting and analytics queries without deployment changes by focusing on plan-based improvements, set-based query rewrites, and index design recommendations that safely reduce runtime across existing database infrastructure.

Why does my analytics query run slowly on large datasets despite proper indexing?

Analytics queries run slowly on large datasets when execution plans use inefficient access patterns, requiring set-based query transformations and advanced SQL patterns like CTEs or window functions to bypass bottlenecks and improve runtime.