sql-optimization

Analyze SQL execution plans and suggest index creation for query optimization.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/voidrot/agents --skill sql-optimization-voidrot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-optimization
Source: https://github.com/voidrot/agents/tree/main/skills/database/sql-optimization
Command: npx skills add https://github.com/voidrot/agents --skill sql-optimization-voidrot

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps diagnose and optimize SQL queries, enhancing database performance and efficiency.

Core Features & Use Cases

  • Query Analysis: Analyze and improve slow SQL queries using EXPLAIN tools.
  • Index Design: Design and optimize indexes for better query performance.
  • Query Rewrite: Provide recommendations for rewriting queries for improved performance.
  • Use Case: When faced with a slow query in a SQL database, this Skill can help identify bottlenecks and suggest index creation or query rewrites.

Quick Start

Use the sql-optimization skill to analyze the performance of the query: 'SELECT * FROM orders WHERE status = "shipped"'.

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 queries using EXPLAIN execution plans?

SQL query optimization analyzes EXPLAIN execution plans to identify performance bottlenecks, then suggests index creation and rewrites SQL queries to improve database efficiency.

How do I design indexes for better SQL query performance?

Index design for SQL query performance evaluates your database schema and query patterns, then recommends creating targeted indexes to accelerate data retrieval and reduce scan overhead.

Does this SQL optimization approach work with PostgreSQL and MySQL?

SQL optimization applies universal techniques that work with MySQL, PostgreSQL, SQL Server, and Oracle, analyzing execution plans and indexing strategies across these SQL databases.

What is the best way to rewrite SQL queries for pagination performance?

Optimizing pagination in SQL queries involves rewriting inefficient offset-based structures and applying indexing strategies to minimize data scanning and boost retrieval speed.

Why does my SQL query ignore the index I created?

SQL query index issues often stem from mismatched query conditions or functions on indexed columns; query analysis identifies these bottlenecks and suggests rewriting queries for proper index utilization.