Chapter 2. SQL Server Execution Model and Wait Statistics

It is impossible to troubleshoot SQL Server instances without understanding its execution model. You need to know how SQL Server runs tasks and manages resources if you want to detect bottlenecks in the system. I will cover those topics in this chapter.

First, the chapter will describe SQL Server’s architecture and major components. Next, it will discuss SQL Server’s execution model and introduce you to the popular troubleshooting technique called Wait Statistics. It will also cover several dynamic management views commonly used during troubleshooting. Finally, it will provide you with an overview of Resource Governor, which you can configure to segregate different workloads in the system.

SQL Server: High-Level Architecture

As you know, SQL Server is a very complex product that consists of dozens of components and subsystems. It is impossible to cover all of them here, but in this section, you’ll get a high-level overview. For the sake of understanding, I’ll divide these components and subsystems into several categories, as shown in Figure 2-1. Let’s talk about them.

The Protocol layer handles communication between SQL Server and client applications. It uses an internal format called Tabular Data Stream (TDS) to transmit data using network protocols such as TCP/IP or Named Pipes. If a client application and SQL Server are running on the same machine, you can use another protocol called Shared Memory.

Figure 2-1. Major ...

Get SQL Server Advanced Troubleshooting and Performance Tuning 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.