database-optimizer

Analyze PostgreSQL and MySQL query performance using EXPLAIN ANALYZE.

Updated May 14, 2026
One-click install
npx skills add https://github.com/nkseth/copilot-dev-skills --skill database-optimizer-nkseth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-optimizer
Source: https://github.com/nkseth/copilot-dev-skills/tree/main/skills/database-optimizer
Command: npx skills add https://github.com/nkseth/copilot-dev-skills --skill database-optimizer-nkseth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Diagnose slow queries, optimize execution plans, and design effective indexes to boost PostgreSQL and MySQL performance across production workloads.

Core Features & Use Cases

  • Analyze performance with EXPLAIN ANALYZE and collect baseline metrics.
  • Design and implement index strategies and query rewrites to reduce cost and improve throughput.
  • Tune configuration and partitioning to enhance scalability while minimizing locking and contention.
  • Use Case: When a reporting query runs slow on a large table, apply the optimizer to reduce execution time by an order of magnitude.

Quick Start

Ask the optimizer to generate an index and plan for a given slow query.

Frequently Asked Questions about database-optimizer

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

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

To optimize slow PostgreSQL queries, analyze execution plans using EXPLAIN ANALYZE to identify bottlenecks, then apply query rewrites and design effective indexes to reduce cost and improve throughput.

What is the best way to resolve lock contention in MySQL production workloads?

Resolving MySQL lock contention involves tuning database configurations, evaluating execution plans, and adjusting partitioning strategies to minimize locking and enhance scalability in production environments.

How do I design indexes to improve database performance on large tables?

Designing indexes to improve database performance requires analyzing slow query execution plans, identifying missing indexes, and implementing targeted index strategies to reduce execution time by an order of magnitude.

Does database optimization require specific permissions to evaluate execution plans?

Yes, database optimization requires proper permissions to run EXPLAIN ANALYZE and collect baseline metrics, along with safe testing practices to validate index and configuration improvements before production deployment.

When should I use partitioning to enhance database scalability?

Use partitioning to enhance database scalability when handling large tables, reducing query execution time, and minimizing lock contention by distributing data across more manageable physical segments.