db-explain

Analyze PostgreSQL query plans with EXPLAIN ANALYZE to identify bottlenecks.

3|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/GDSDN/kord-aios --skill db-explain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-explain
Source: https://github.com/GDSDN/kord-aios/tree/main/src/features/builtin-skills/kord-aios/database/db-explain
Command: npx skills add https://github.com/GDSDN/kord-aios --skill db-explain

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps identify and resolve performance bottlenecks in SQL queries by providing detailed analysis of query execution plans.

Core Features & Use Cases

  • Query Plan Analysis: Runs EXPLAIN (ANALYZE, BUFFERS) to show how PostgreSQL executes a query.
  • Performance Bottleneck Identification: Pinpoints issues like sequential scans, missing indexes, high buffer reads, and poor row estimates.
  • Optimization Suggestions: Provides actionable advice and examples for improving query speed.
  • Use Case: A user has a slow-running report query. They use db-explain to analyze the query plan, discover a sequential scan on a large table, and then use the Skill's suggestions to create an appropriate index, significantly speeding up the report.

Quick Start

Use the db-explain skill to analyze the performance of the SQL query 'SELECT * FROM users WHERE status = 'active''.

Frequently Asked Questions about db-explain

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

FAQPage Schema
How do I analyze SQL query performance using EXPLAIN ANALYZE in PostgreSQL?

PostgreSQL query performance analysis runs EXPLAIN (ANALYZE, BUFFERS) to display query plans, buffer usage, and cost metrics, pinpointing bottlenecks like sequential scans to improve execution speed.

What causes high buffer reads and sequential scans in a PostgreSQL query plan?

High buffer reads and sequential scans in a query plan usually indicate missing indexes or poor row estimates, creating performance bottlenecks that require query optimization to resolve.

How do I optimize slow SQL queries and identify missing indexes?

Optimize slow SQL queries by analyzing execution plans to identify bottlenecks and applying actionable optimization suggestions, such as creating appropriate indexes to replace sequential scans on large tables.

Do I need a PostgreSQL database connection string to run query optimization analysis?

Yes, running PostgreSQL query optimization requires a database connection string and the target SQL query as input to execute EXPLAIN ANALYZE and retrieve execution plan metrics.

What's the best way to troubleshoot slow-running report queries in PostgreSQL?

Troubleshooting slow PostgreSQL report queries involves analyzing the query plan to find sequential scans on large tables and using optimization suggestions to build appropriate indexes for faster execution.