sql-query-optimizer

Analyze EXPLAIN plans and rewrite SQL queries for PostgreSQL and MySQL.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/vecear/Nipponverb --skill sql-query-optimizer-vecear
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-query-optimizer
Source: https://github.com/vecear/Nipponverb/tree/main/.claude/skills/sql-query-optimizer
Command: npx skills add https://github.com/vecear/Nipponverb --skill sql-query-optimizer-vecear

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyze and optimize SQL queries to reduce latency by interpreting EXPLAIN plans, highlighting bottlenecks, and prescribing concrete changes.

Core Features & Use Cases

  • EXPLAIN analysis to surface plan costs and bottlenecks.
  • Index recommendations and covering/indexing strategies for common query patterns.
  • Query rewrites to avoid expensive operations and improve plan shape.
  • Performance benchmarking to quantify improvements before and after changes.

Quick Start

Run a problematic query through the tool to receive an explain plan, recommended indexes, and a rewritten version that yields faster results.

Frequently Asked Questions about sql-query-optimizer

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

FAQPage Schema
How do I optimize slow SQL queries using EXPLAIN analysis?

To optimize slow SQL queries, you analyze the EXPLAIN plan to surface execution costs and bottlenecks, then apply index recommendations and query rewrites to reduce latency and improve performance.

What's the best way to reduce database latency for expensive queries in PostgreSQL?

Reducing database latency involves interpreting EXPLAIN plans to identify bottlenecks and prescribing concrete changes like index recommendations and query rewrites tailored for PostgreSQL and other relational databases.

Does this query optimization approach work with MySQL and other relational databases?

Yes, this query optimization approach works with MySQL, PostgreSQL, and other relational databases by applying covering strategies, indexing recommendations, and performance benchmarking across different SQL environments.

How do I avoid expensive operations when rewriting SQL queries?

You avoid expensive operations by rewriting SQL queries to improve the plan shape, leveraging index recommendations and covering strategies to eliminate costly execution steps identified during EXPLAIN analysis.

Can I benchmark SQL performance improvements before and after applying index recommendations?

Yes, you can benchmark SQL performance to quantify improvements before and after applying changes, ensuring that the index recommendations and query rewrites yield faster and more efficient database results.

When should I use covering indexes for database tuning?

You should use covering indexes during database tuning when EXPLAIN analysis reveals high retrieval costs, allowing the index to cover common query patterns and significantly reduce expensive table scan operations.