Untitled

mail@pastecode.io avatar
unknown
sqlserver
7 months ago
359 B
1
Indexable
Never
SELECT TOP 10
    r.session_id,
    s.login_name,
    r.status,
    r.command,
    r.cpu_time,
    r.total_elapsed_time,
    r.percent_complete,
    r.reads,
    r.writes,
    t.text AS [SQL Text]
FROM sys.dm_exec_requests r
JOIN sys.dm_exec_sessions s ON r.session_id = s.session_id
CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) t
ORDER BY r.cpu_time DESC;