# Execution Plan Review for SQL Optimization

Review SQL execution plans to identify performance issues like full scans, missing indexes, sorting, and lock waits. Provide actionable insights for optimization based on EXPLAIN output.

**Canonical URL:** https://skillshunter.net/skills/github-eosphoros-ai-db-gpt-assets-retired-suites-db-ops-skills-explain-plan-8a684a358105

**JSON URL:** https://skillshunter.net/api/public/v1/skills/github-eosphoros-ai-db-gpt-assets-retired-suites-db-ops-skills-explain-plan-8a684a358105

**Markdown URL:** https://skillshunter.net/skills/github-eosphoros-ai-db-gpt-assets-retired-suites-db-ops-skills-explain-plan-8a684a358105.md

**Instructions download URL:** https://skillshunter.net/skills/github-eosphoros-ai-db-gpt-assets-retired-suites-db-ops-skills-explain-plan-8a684a358105/download

**Category:** Software & Development

**Source URL:** https://github.com/eosphoros-ai/DB-GPT/blob/bb9c5e8a62a2c3ee3ea62e4c42d88f4deea2f372/assets/retired-suites/db-ops/skills/explain-plan/SKILL.md

**Source commit:** bb9c5e8a62a2c3ee3ea62e4c42d88f4deea2f372

**Listing approved at:** 2026-11-27

**Created at:** 2026-11-26T09:15:24.000000Z

**Updated at:** 2026-11-27T07:43:08.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Ensure the EXPLAIN output is available and accurate before reviewing. Do not assume or fabricate execution plan details if they are not provided.

### When to use it

- Identify full table scans in a SELECT query with no WHERE clause.
- Detect missing indexes in a JOIN operation causing high cost.
- Analyze sorting operations in ORDER BY clauses for optimization.

## Skill instructions

---
name: explain-plan
name_zh: 执行计划解读
name_en: Execution Plan Review
description_en: Interpret a SQL execution plan and identify full scans, index issues, sorting, and lock evidence. Clearly mark findings that still require verification.
argument-hint-en: Review the EXPLAIN output for this SQL and identify plan issues
command: /explain
description: 解读单条 SQL 的执行计划，定位全表扫描、索引失效、排序与锁等待证据。
user-invocable: true
argument-hint-zh: 对以下 SQL 做 EXPLAIN 判读并指出坏计划原因：
---

# 执行计划解读

遵循[慢查询诊断技能](../slow-query-diagnosis/SKILL.md)与其中的根因及安全参考。
优先解读用户给出的 SQL 与 EXPLAIN；已连接目标库且获准时才能采集。
没有真实执行计划时明确标注待验证，不虚构 rows、耗时或索引命中。
修复动作只出提案，不自动执行 DDL 或 ANALYZE。

