Azure Documentation

Overview

This guide provides best‑practice recommendations and tools to monitor the performance of Azure SQL Database. Learn how to collect metrics, interpret telemetry, and tune your workloads for optimal throughput and latency.

Key Metrics

Metric Description Unit Suggested Threshold
DTU ConsumptionComposite measure of CPU, memory, reads, and writes.DTU %>80% sustained
CPU %CPU utilization of the database.%>75% sustained
Data IOLogical reads per second.MB/s>70% of allocated
Log IOWrites to transaction log.MB/s>75% of allocated
DeadlocksNumber of deadlock events per minute.Count/min>0 (alert)
Wait StatisticsTop wait types contributing to latency.msAnalyze top 5

Monitoring Tools

Azure Portal
SQL Analytics
PowerShell / CLI

Use the Metrics Explorer in the Azure portal to view real‑time charts of DTU, CPU, and IO.

Best Practices

Sample Monitoring Query (Dynamic Management Views)

SELECT
    r.session_id,
    r.start_time,
    DATEDIFF(SECOND, r.start_time, GETDATE()) AS duration_sec,
    SUBSTRING(t.text, (r.statement_start_offset/2)+1,
        ((CASE r.statement_end_offset
            WHEN -1 THEN DATALENGTH(t.text)
            ELSE r.statement_end_offset END
            - r.statement_start_offset)/2)+1) AS query_text,
    r.status,
    r.command,
    r.total_elapsed_time/1000 AS total_ms,
    r.cpu_time/1000 AS cpu_ms,
    r.reads, r.writes
FROM sys.dm_exec_requests r
CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) t
WHERE r.session_id > 50
ORDER BY r.cpu_time DESC;