db-query-optimizer

Analyze SQL queries for performance issues and optimization recommendations.

5|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/47network/Sven --skill db-query-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-query-optimizer
Source: https://github.com/47network/Sven/tree/main/skills/compute-mesh/db-query-optimizer
Command: npx skills add https://github.com/47network/Sven --skill db-query-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzes SQL queries for performance issues and provides actionable optimization recommendations.

Core Features & Use Cases

  • Analyze queries for performance issues and surface insights
  • Suggest appropriate indexes, including composite indexes
  • Detect anti-patterns such as N+1 queries, missing WHERE clauses, and inefficient joins
  • Explain execution plans and propose concrete improvements

Quick Start

Provide a SQL query and set action to analyze to receive performance diagnostics and optimization suggestions.

Frequently Asked Questions about db-query-optimizer

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

FAQPage Schema
How do I optimize SQL queries to fix performance issues?

To optimize SQL queries, you analyze them to identify performance bottlenecks and surface actionable recommendations. This process detects anti-patterns like missing WHERE clauses and N+1 queries, then proposes concrete improvements such as generating appropriate indexes.

What are common SQL anti-patterns that slow down database queries?

Common SQL anti-patterns that slow down database queries include N+1 query structures, missing WHERE clauses, and inefficient joins. Detecting these anti-patterns allows you to refactor the workload and apply targeted optimizations for better performance.

Can I analyze PostgreSQL and MySQL execution plans to improve query performance?

Yes, you can analyze PostgreSQL and MySQL execution plans to improve query performance. By explaining the execution plan, you can identify bottlenecks within your specific database dialect and receive concrete structural improvements to speed up the workload.

How do I know which indexes to add for slow SQL queries?

To know which indexes to add for slow SQL queries, you analyze the query structure and database schema. This analysis suggests appropriate indexes, including composite indexes tailored to your specific joins and filtering conditions, to accelerate execution.

Does database query optimization work for both OLTP and reporting workloads?

Database query optimization works for both OLTP and reporting workloads, as well as ad-hoc analytics queries. It analyzes the specific SQL commands across PostgreSQL, MySQL, and SQLite to provide targeted performance diagnostics and structural improvements.