sqldw-operations-cli

Diagnose Fabric Data Warehouse performance using sqlcmd and queryinsights views.

Updated Jul 14, 2026
One-click install
npx skills add https://github.com/9vantage/skills-for-fabric-clone --skill sqldw-operations-cli-9vantage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sqldw-operations-cli
Source: https://github.com/9vantage/skills-for-fabric-clone/tree/main/plugins/fabric-operations/skills/sqldw-operations-cli
Command: npx skills add https://github.com/9vantage/skills-for-fabric-clone --skill sqldw-operations-cli-9vantage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Investigating slow queries and performance regressions in Microsoft Fabric Data Warehouse is difficult without a structured approach. This Skill provides ready-to-run, read-only T-SQL diagnostics against the built-in queryinsights views so you can pinpoint slow queries, resource pressure, cache behavior, and clustering opportunities from the CLI. ## Core Features & Use Cases - Performance Analysis: Find long-running queries, top CPU and storage consumers, user query patterns, and compare recent performance against a historical baseline. - Deep Diagnostics: Analyze SQL pool pressure windows, classify query cache warmth (cold vs warm runs), and generate cluster key recommendations with CTAS-based application steps. - Use Case: When a user reports "my warehouse is slower than last week", run the baseline comparison query to quantify the regression, then drill into pressure windows and the heaviest queries to identify the root cause and recommend clustering or caching fixes. ## Quick Start Ask the agent to find the slowest queries in your Fabric warehouse and it will connect via sqlcmd and run the queryinsights diagnostics.

Frequently Asked Questions about sqldw-operations-cli

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

FAQPage Schema
How do I find the slowest queries in a Fabric Data Warehouse?

Query the queryinsights.long_running_queries view ordered by total_elapsed_time_ms to find the slowest queries. Connect with sqlcmd using Entra ID authentication (the -G flag) and run the provided T-SQL to get execution counts, last run time, and median duration.

How to diagnose SQL pool pressure in Microsoft Fabric warehouse?

Use the queryinsights.sql_pool_insights view to identify pressure windows where is_pool_under_pressure equals 1, then correlate those windows with the heaviest overlapping queries from exec_requests_history. The skill provides a two-step query that consolidates consecutive pressure events into windows.

What permissions are needed to query queryinsights views in Fabric?

Querying queryinsights views requires an Admin or Member role on the target Fabric workspace. The views are always enabled and retain 30 days of history, with data appearing up to 15 minutes after query completion.

Can I use ALTER TABLE to add clustering keys in Fabric Data Warehouse?

No, Fabric Data Warehouse does not support ALTER TABLE SET DATA_CLUSTERING_KEY. Instead, create a clustered copy using CTAS with WITH (CLUSTER BY (...)), swap tables with sp_rename, and verify clustering via sys.index_columns.data_clustering_ordinal.

Why does my queryinsights query return no data?

Empty results usually mean the warehouse is less than two minutes old, no queries ran recently, or the 15-minute data delay has not elapsed. Permission errors instead indicate insufficient workspace role, and row-level security can also filter results.