Chapter 39

Wait States

In This Chapter

Exploring the SQL Server OS

Examining Wait Statistics

Identifying Common Red-Flag Wait Types

Finding Other Ways to Gather Wait Data

Imagine there are three people in front of you in line at your favorite coffee shop. You eventually get to the front of the line and give the barista your order and patiently step aside. Two of the customers in front of you receive their orders quickly. The barista then hands you your coffee before the customer who was waiting directly in front of you because her request likely required more work to complete than yours.

This process is not unlike how SQL Server handles requests. SQL Server assigns requests (tasks) to worker threads, which wait in a queue to get their turn to run on the CPU (scheduler).

Get Microsoft SQL Server 2012 Bible 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.