Book Description
Every Database Administrator, developer, report writer, and anyone else who writes T-SQL to access SQL Server data, must understand how to read and interpret execution plans. My book leads you right from the basics of capturing plans, through how to interrupt them in their various forms, graphical or XML, and then how to use the information you find there to diagnose the most common causes of poor query performance, and so optimize your SQL queries, and improve your indexing strategy. You'll also learn how to take advantage of the Query Store and the latest optimizations, Adaptive Query Processing.
Every day, out in the various online forums devoted to SQL Server, and on Twitter, the same types of questions come up repeatedly: Why is this query running slowly? Why is SQL Server ignoring my index? Why does this query run quickly sometimes and slowly at others? My response is the same in each case: have you looked at the execution plan?
An execution plan describes what's going on behind the scenes when SQL Server executes a query. It shows how the query optimizer joined the data from the various tables defined in the query, which indexes it used, if any, how it performed any aggregations or sorting, and much more. It also estimates the cost of all of these operations, in terms of the relative load placed on the system.
Every Database Administrator, developer, report writer, and anyone else who writes T-SQL to access SQL Server data, must understand how to read and interpret execution plans. My book leads you right from the basics of capturing plans, through how to interrupt them in their various forms, graphical or XML, and then how to use the information you find there to diagnose the most common causes of poor query performance, and so optimize your SQL queries, and improve your indexing strategy.
This open book is licensed strictly for personal or educational use. You can download SQL Server Execution Plans, 3rd Edition ebook for free in PDF format (67.9 MB).
Table of Contents
Chapter 1
Introducing the Execution Plan
Chapter 2
Getting Started Reading Plans
Chapter 3
Data Reading Operators
Chapter 4
Joining Data
Chapter 5
Sorting and Aggregating Data
Chapter 6
Execution Plans for Data Modifications
Chapter 7
Execution Plans for Common T-SQL Statements
Chapter 8
Examining Index Usage
Chapter 9
Exploring Plan Reuse
Chapter 10
Controlling Execution Plans with Hints
Chapter 11
Parallelism in Execution Plans
Chapter 12
Batch Mode Processing
Chapter 13
The XML of Execution Plans
Chapter 14
Plans for Special Data Types and Cursors
Chapter 15
Automating Plan Capture
Chapter 16
The Query Store
Chapter 17
SSMS Tools for Exploring Execution Plans