The short answer
In Azure Synapse Dedicated SQL Pool, client queries are split into multiple distributed execution steps coordinated by the control node. When an analyst reports that a query is hanging, querying dynamic management views (DMVs) reveals the exact physical bottleneck.
The primary diagnostic DMVs
- sys.dm_pdw_exec_requests: Identifies active, queued, and completed queries across the entire dedicated pool.
- sys.dm_pdw_request_steps: Breaks down an active query into its physical execution steps, such as broadcasting data, shuffling distributions, or returning results to the client.
- sys.dm_pdw_sql_requests: Shows the exact T-SQL query fragments executing on individual distributions across compute nodes.
-- Step 1: Find the request ID of the slow query
SELECT request_id, [status], submit_time, total_elapsed_time, [label]
FROM sys.dm_pdw_exec_requests
WHERE [status] = 'Running'
ORDER BY total_elapsed_time DESC;
-- Step 2: Inspect which step is consuming time
SELECT step_index, operation_type, total_elapsed_time, [status]
FROM sys.dm_pdw_request_steps
WHERE request_id = 'QID104857'
ORDER BY step_index;Interpreting the output
- If
operation_typeshowsRandomIDOperationorBroadcastMoveOperationtaking 95% of total time, the query is stalled by network transfer due to uncolocated tables. - If a step shows
status = 'Running'for 20 minutes while its step type isReturnOperation, checksys.dm_pdw_sql_requeststo see if a single distribution has and is processing all the rows alone. - If a query shows
status = 'Suspended', it is waiting in a Workload Management queue for concurrency slots or memory grants to become available.