sql-optimization

Optimize SQL query performance across MySQL, PostgreSQL, and SQL Server.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/74nu5/Narratum --skill sql-optimization-74nu5
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-optimization
Source: https://github.com/74nu5/Narratum/tree/main/.github/skills/sql-optimization
Command: npx skills add https://github.com/74nu5/Narratum --skill sql-optimization-74nu5

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses slow-performing SQL queries and database operations by providing expert analysis and actionable optimization strategies.

Core Features & Use Cases

  • Query Analysis: Identifies inefficient SQL patterns, subqueries, and JOINs.
  • Indexing Strategies: Recommends optimal index creation and management.
  • Performance Tuning: Offers techniques for pagination, aggregation, and batch operations.
  • Use Case: Optimize a slow-running e-commerce report by analyzing its SQL query, suggesting better indexing, and rewriting inefficient JOINs to drastically reduce load times.

Quick Start

Use the sql-optimization skill to analyze and improve the performance of the provided SQL query.

Frequently Asked Questions about sql-optimization

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

FAQPage Schema
How do I optimize slow SQL query performance in MySQL or PostgreSQL?

To optimize slow SQL query performance, you must analyze execution plans to identify inefficient patterns, rewrite subqueries and JOINs, and implement proper indexing strategies to drastically reduce database load times.

What is the best way to analyze SQL execution plans for query tuning?

Analyzing SQL execution plans for query tuning involves examining how the database engine executes queries to identify bottlenecks, revealing inefficient patterns and guiding indexing strategies for optimal performance.

How do I improve database performance for batch operations and pagination?

Improving database performance for pagination and batch operations requires applying specific SQL optimization techniques that streamline data aggregation and reduce the overhead of processing large datasets.

Does this SQL query tuning approach work across different database systems?

Yes, this SQL query tuning approach works across various database systems including MySQL, PostgreSQL, and SQL Server, providing comprehensive performance analysis and optimization strategies for each platform.

Why does my SQL query experience slow load times during e-commerce reporting?

Slow SQL query load times during e-commerce reporting usually stem from inefficient JOINs and missing indexes, which can be resolved by analyzing the query execution plan and rewriting inefficient patterns.

When should I use indexing strategies instead of rewriting SQL for optimization?

You should use indexing strategies when the execution plan reveals full table scans or missing access paths, whereas rewriting SQL is necessary to fix inefficient subqueries and complex JOIN patterns.