Analyze queries
How to analyze queries to identify performance problems. A step-by-step method.
How to analyze queries to identify performance problems. A step-by-step method.
Extract deadlock graphs from the SQL Server system_health session with a query, then save them as .xdl files to open them in SSMS.
Find the path of the SQL Server ERRORLOG files with SERVERPROPERTY, identify the rotated logs, and zip them to send them for analysis.
Diagnose memory grants that are too large or too small in SQL Server: varchar(max) sizing, actual plans, the query_memory_grant_usage event, tempdb spills.
Useful sp_whoisactive parameters to see the queries running now: execution plans, blocking chain leaders, memory grant information, average duration.
Capture actual execution plans with an Extended Events session on SQL Server 2017 CU21 and 2019, filtered by database, login or duration.
Find the transaction that holds the log in SQL Server: DBCC OPENTRAN, log_reuse_wait_desc, session DMVs, and what to know before running KILL.