database-optimizer

Analyze slow queries and design indexes for PostgreSQL and MySQL databases.

Updated Apr 25, 2026
One-click install
npx skills add https://github.com/Serg28/demosite --skill database-optimizer-serg28
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-optimizer
Source: https://github.com/Serg28/demosite/tree/main/.agents/skills/database-optimizer
Command: npx skills add https://github.com/Serg28/demosite --skill database-optimizer-serg28

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

It streamlines the process of enhancing database query efficiency and overall system scalability, reducing slowdowns and resource wastage.

Core Features & Use Cases

  • Slow Query Analysis: Identify and analyze performance bottlenecks using execution plans and statistics.
  • Index Strategy Design: Create and optimize indexes, including covering and partial indexes, to accelerate common queries.
  • Configuration Tuning: Adjust database parameters such as buffer sizes, work memory, and WAL settings for optimal throughput.
  • Use Case: When a database experiences sluggish response times, deploy this skill to diagnose issues, implement effective indexes, and modify configurations to regain performance.

Quick Start

Use the database-optimizer skill to analyze a slow query by providing the query statement for detailed execution plan insights.

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 queries in PostgreSQL and MySQL?

Analyzing slow queries involves using EXPLAIN ANALYZE to generate execution plans and statistics for PostgreSQL and MySQL. This identifies performance bottlenecks by showing how the database processes queries, targeting specific inefficiencies for optimization.

What is the best way to design indexes for query optimization?

Index strategy design for query optimization involves creating covering and partial indexes to accelerate common queries. This targets specific query patterns, reducing lookup times and minimizing resource wastage by ensuring efficient data retrieval.

How do I tune database configuration parameters for better throughput?

Tuning database configuration involves adjusting parameters like buffer sizes, work memory, and WAL settings. This optimizes throughput by allocating system resources effectively, ensuring the database handles operations without unnecessary slowdowns or memory bottlenecks.

Does this query tuning approach work with both PostgreSQL and MySQL environments?

Yes, this query tuning supports both PostgreSQL and MySQL environments. It uses standard tools like EXPLAIN ANALYZE, index creation commands, and parameter setting commands to diagnose issues and implement performance enhancements across both systems.

When should I not use covering or partial indexes for performance tuning?

You should avoid using covering or partial indexes when a database experiences write-heavy workloads, as they introduce overhead during data modifications. Index optimization targets read acceleration, so unnecessary indexes waste storage and degrade write throughput.