Chapter 5. CPU and Query Processing

WHAT'S IN THIS CHAPTER

  • How CPU architecture affects SQL Server performance

  • How SQL Server processes queries

  • Understanding query optimization

  • Reading query plans

  • Using options to affect query plans

  • Using plan hints to affect query plans

The CPU is at the core of everything that happens on a computer. This is especially true when working with SQL Server. An understanding of how the CPU works, and what it does is very valuable when trying to understand what SQL server is doing.

Query processing is one of the most critical activities that SQL Server performs when taking your T-SQL queries and returning data to you. Understanding how SQL Server process queries, how they are optimized, and executed is essential to understanding what SQL Server is doing, and why it is doing what it is doing in the way it has chosen to do it.

This chapter brings together essential information on both the CPU, and Query Processing.

In the first part of this chapter you will see how a modern CPU works, learn about the key elements of the CPU, learn about hyperthreading, and multiple core processors, and how these and other processor features can affect the performance you get from SQL Server.

In the second part of the chapter you will learn how SQL Server query processing works, looking at the details of query optimization, you will examine the various options that you can use to influence the optimization process, how SQL Server schedules activities, and executes them.

THE CPU

The ...

Get Professional SQL Server® 2008 Internals and Troubleshooting 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.