sql-optimization-patterns

Analyze SQL query execution plans and implement indexing strategies.

Updated May 30, 2026
One-click install
npx skills add https://github.com/InnerScopeHearing/otchealth-claude-tools --skill sql-optimization-patterns-innerscopehearing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-optimization-patterns
Source: https://github.com/InnerScopeHearing/otchealth-claude-tools/tree/main/skills/sql-optimization-patterns
Command: npx skills add https://github.com/InnerScopeHearing/otchealth-claude-tools --skill sql-optimization-patterns-innerscopehearing

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a comprehensive guide to optimizing SQL queries, indexing strategies, and EXPLAIN analysis, enabling users to improve database performance and eliminate slow queries.

Core Features & Use Cases

  • EXPLAIN Analysis: Understand and optimize query execution plans.
  • Index Strategies: Learn and implement effective indexing techniques.
  • Query Optimization: Apply best practices to optimize SQL queries.
  • Use Case: Use this Skill to debug slow-running queries, design performant database schemas, or optimize application performance.

Quick Start

Analyze the EXPLAIN plan for a slow query using the provided examples.

Frequently Asked Questions about sql-optimization-patterns

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

FAQPage Schema
How do I optimize slow SQL queries using execution plans?

Analyze the EXPLAIN plan to understand the query execution path, identify bottlenecks like full table scans, and apply indexing techniques to improve database performance. This Skill provides examples to guide this process.

What are the best indexing strategies for database performance?

Effective indexing strategies involve creating targeted indexes for frequently queried columns to reduce disk I/O. This guide helps you implement these techniques to eliminate slow queries and design performant database schemas.

Do I need database administration knowledge to use SQL optimization techniques?

Yes, optimizing SQL queries requires prior knowledge of SQL and database management. This guide is suitable for database administrators, developers, and data analysts who need to debug slow-running queries.

How does EXPLAIN analysis help debug slow-running queries?

EXPLAIN analysis reveals the database execution plan, showing how tables are joined and indexed. By reviewing this output, you can pinpoint inefficiencies in your SQL query and apply optimization best practices.

What is the best way to design performant database schemas?

Designing performant schemas requires applying query optimization and indexing strategies early. Use this guide to evaluate execution plans and structure your tables to support efficient application performance.