通过命令行分析 Fabric 数据仓库性能,定位慢查询与资源压力并给出优化建议。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "sqldw-operations-cli" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/skills-for-fabric/main/plugins/fabric-skills/skills/sqldw-operations-cli/SKILL.md 2. 保存为 ~/.claude/skills/sqldw-operations-cli/SKILL.md 3. 装好后重载技能,告诉我可以用了
请用 sqldw-operations-cli 分析这个 Fabric Data Warehouse 最近 24 小时最慢的查询,基于 queryinsights 视图列出耗时最长的 10 条 SQL,并说明它们的执行时间、资源消耗、可能瓶颈和优化建议。
返回慢查询排行、关键指标、问题原因分析,以及可执行的 SQL 优化建议。
请用 sqldw-operations-cli 检查这个仓库最近 7 天的 SQL pool pressure 情况,找出压力事件出现的时间窗口、主要资源消费者,并判断性能下降是否与资源争用有关。
输出压力时间段、高消耗查询或用户、影响判断,以及缓解资源争用的建议。
请用 sqldw-operations-cli 根据用户查询模式和表访问特征,分析这个 Fabric 数据仓库中哪些表适合调整聚簇键,并给出推荐方案、预期收益和需要注意的风险。
给出候选表清单、聚簇键推荐、性能收益预估,以及实施注意事项。
Update Check — ONCE PER SESSION (mandatory) The first time this skill is used in a session, run the check-updates skill before proceeding.
- GitHub Copilot CLI / VS Code: invoke the
check-updatesskill.- Claude Code / Cowork / Cursor / Windsurf / Codex: compare local vs remote package.json version.
- Skip if the check was already performed earlier in this session.
CRITICAL NOTES
- To find the workspace details (including its ID) from workspace name: list all workspaces and, then, use JMESPath filtering
- To find the item details (including its ID) from workspace ID, item type, and item name: list all items of that type in that workspace and, then, use JMESPath filtering
This skill provides performance analysis, deep diagnostics, and optimization guidance for Microsoft Fabric Data Warehouse via sqlcmd and the built-in queryinsights views. All queries are read-only.
For tool installation and authentication setup, see COMMON-CLI.md § Authentication Recipes and COMMON-CLI.md § SQL / TDS Data-Plane Access.
Monitoring-specific requirements:
queryinsights views)queryinsights views retain 30 days; data appears with up to 15 min delay)| Task | Reference | Notes |
|---|---|---|
| Finding Workspaces and Items in Fabric | COMMON-CLI.md § Finding Workspaces and Items in Fabric | Mandatory — READ link first [needed for finding workspace id by its name or item id by its name, item type, and workspace id] |
| Fabric Topology & Key Concepts | COMMON-CORE.md § Fabric Topology & Key Concepts | |
| Environment URLs | COMMON-CORE.md § Environment URLs | |
| Authentication & Token Acquisition | COMMON-CORE.md § Authentication & Token Acquisition | Wrong audience = 401; read before any auth issue |
| Core Control-Plane REST APIs | COMMON-CORE.md § Core Control-Plane REST APIs | Includes pagination, LRO polling, and rate-limiting patterns |
| Capacity Management | COMMON-CORE.md § Capacity Management | |
| Gotchas, Best Practices & Troubleshooting (Platform) | COMMON-CORE.md § Gotchas, Best Practices & Troubleshooting | |
| Tool Selection Rationale | COMMON-CLI.md § Tool Selection Rationale | |
| Authentication Recipes | COMMON-CLI.md § Authentication Recipes | az login flows and token acquisition |
Fabric Control-Plane API via az rest | COMMON-CLI.md § Fabric Control-Plane API via az rest | Always pass --resource; includes pagination and LRO helpers |
| SQL / TDS Data-Plane Access | COMMON-CLI.md § SQL / TDS Data-Plane Access | sqlcmd (Go) connect, query, CSV export |
| Gotchas & Troubleshooting (CLI-Specific) | COMMON-CLI.md § Gotchas & Troubleshooting (CLI-Specific) | az rest audience, shell escaping, token expiry |
| Quick Reference | COMMON-CLI.md § Quick Reference | az rest template + token audience/tool matrix |
…
检查 skills-for-fabric 技能集是否有更新,并展示版本差异与更新日志。
通过命令行对 Fabric 仓库与 Lakehouse 执行只读 T-SQL 查询、探查与导出数据。