Dw performance optimization
Skill pugyy/dw-harness/template/.claude/skills/dw-performance-optimization
A Claude Code engineering template for reliable data warehouse AI development./面向数仓 AI 开发的 Claude Code 工程化模板:hooks、skills、subagents 与八步标准流程。
npx -y skills add pugyy/dw-harness --skill dw-performance-optimizationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
数仓性能优化流程,适用于分析 ETL SQL 执行计划、分区裁剪、JOIN 策略、数据倾斜和资源瓶颈。直接调用命令:/dw-performance-optimization。
SKILL.md
1.3 KB, as published. Nobody here has run it
Step 7: 性能优化
执行流程
- 调用
dw-explorersubagent 分析表结构和血缘(防止撑爆主 context) - 检查 SQL 执行计划和性能瓶颈
- 输出优化建议
检查维度
SQL 层面
- 是否存在全表扫描
- JOIN 是否合理(小表驱动大表)
- WHERE 条件是否使用分区裁剪
- 是否存在数据倾斜
- GROUP BY / DISTINCT 是否可优化
存储层面
- 分区策略是否合理
- 文件大小是否均匀
- 是否存在小文件过多
资源层面
- 资源分配是否合理
- 是否可以增加并行度
推荐提示词
对 [表名] 的 ETL SQL 进行性能分析:
1. 用 dw-explorer 分析表结构和上下游血缘
2. 检查 insert_[表名].sql 的执行计划
3. 给出优化建议
输出格式
## 性能分析报告
### 当前瓶颈
- [瓶颈 1]
- [瓶颈 2]
### 优化建议
| # | 优化项 | 预期提升 | 改动难度 |
|---|--------|---------|---------|
| 1 | ... | ... | ... |
### 优化后 SQL
[优化后的 SQL 语句]