database-optimizer

Analyze slow database queries and execution plans for PostgreSQL and MySQL.

9|2|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/stephanj/claude-code-collections --skill database-optimizer-stephanj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-optimizer
Source: https://github.com/stephanj/claude-code-collections/tree/main/skills/database-optimizer
Command: npx skills add https://github.com/stephanj/claude-code-collections --skill database-optimizer-stephanj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses performance bottlenecks in database systems by providing a structured approach to analyzing slow queries, identifying missing indexes, and tuning configuration parameters.

Core Features & Use Cases

  • Execution Plan Analysis: Deep dive into EXPLAIN and EXPLAIN ANALYZE outputs to find inefficient query paths.
  • Strategic Indexing: Recommendations for B-Tree, covering, and partial indexes to reduce scan times.
  • Performance Tuning: Guidance on PostgreSQL and MySQL configuration settings to maximize throughput and minimize lock contention.

Quick Start

Invoke the database optimizer to analyze the slow query log and suggest index improvements for the current database schema.

Frequently Asked Questions about database-optimizer

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

FAQPage Schema
How do I analyze slow database queries to identify performance bottlenecks?

Analyzing slow database queries involves examining EXPLAIN and EXPLAIN ANALYZE execution plans to pinpoint inefficient access paths, revealing missing indexes and poor query structures that cause high latency in production systems.

What's the best way to optimize PostgreSQL and MySQL query performance for high-traffic systems?

Optimizing PostgreSQL and MySQL query performance requires strategic index design and configuration tuning to rewrite inefficient queries, minimize lock contention, and achieve sub-100ms query latency under high traffic.

Does database optimization work with both PostgreSQL and MySQL environments?

Database optimization supports both PostgreSQL and MySQL environments by providing tailored recommendations for index design, query rewriting, and configuration tuning specific to each platform's architecture and settings.

When do I need to use B-Tree, covering, or partial indexes for database optimization?

You need B-Tree, covering, and partial indexes when execution plans show full table scans or inefficient data retrieval, as strategic indexing reduces scan times by targeting specific query patterns and minimizing resource utilization.

How do I reduce query latency to under 100ms in a production database?

Reducing query latency to under 100ms requires combining execution plan analysis, strategic indexing, and configuration tuning to identify inefficient access patterns and enable query rewriting that optimizes resource utilization.