# PostgreSQL 慢查询调优

> 结合执行计划、索引与统计信息调优 PostgreSQL 慢查询。

**Kind:** skill · **Domain:** Engineering · **ID:** `tech-postgres-slow-query-tuner`

## 输入输出契约

| 输入 | 输出 |
| --- | --- |
| 慢查询、EXPLAIN ANALYZE 输出、表结构、索引清单、行数 | 瓶颈诊断、索引 DDL、改写后的查询、验证步骤 |

## 工作流程与操作说明


2. Parse the EXPLAIN ANALYZE plan for sequential scans and high-cost nodes.
4. Compare filter and join columns against existing indexes.
6. Check statistics freshness and row-count estimates.
8. Propose minimal index DDL or a rewritten query.
10. Explain expected impact and give a verification query.



## 起手提示词

```text
根据这份执行计划调优这条 PostgreSQL 查询。
```

## 常见问题

### 这是一项真实存在于 Clavue Bot 的能力吗？

是的。本页内容由产品内置目录生成，能力名称、输入输出与操作步骤都对应真实可用的场景、技能、MCP 工具或数字员工。

### 需要额外配置工具或连接器吗？

标注「开箱即用」的能力无需额外工具；标注「需连接工具」的能力会列出所需连接器，首次运行时按提示授权即可。

### 它会未经确认就发邮件或付款吗？

不会。发信、付款、提交表单等对外动作会停下来先请你确认，你同意后才会继续。

Canonical: https://ability.clavue.com/zh/skill/tech-postgres-slow-query-tuner/
