© Benjamin Nevarez 2016

Benjamin Nevarez, High Performance SQL Server, 10.1007/978-1-4842-2271-3_2

2. Analyzing Wait Statistics

Benjamin Nevarez

(1)Santa Clarita, California, USA

One of my main recommendations for troubleshooting a performance problem when a particular issue is lacking information is to run a SQL trace or extended events session to find out the most expensive queries. This method will usually show us the most expensive queries based on one or more metrics including duration, CPU usage, logical and physical reads, writes, rows, and so on. Many times the metric of choice is duration, or how long the query took to execute. We usually assume this entire duration is usable work, which of course can be optimized. In a lot of cases, this ...

Get High Performance SQL Server: The Go Faster Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.