Every day, out in the various online forums devoted to SQL Server, and on Twitter, the same types of questions come up 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 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.
SQL Server Execution Plans 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.
I have over thirty years experience working in technical support, development and database administration. I'm work for Redgate Software as a Product Advocate. I am a Microsoft Data Platform MVP and AWS Community Builder. I write articles for publication at SQL Server Central and Simple-Talk. I present sessions at events, large and small, all around the world and online. I work with both SQL Server and PostgreSQL and have authored multiple books on a variety of topics related to databases and data management.
This book was an easy read on a subject that can be relatively intimidating for a developer with no experience in the area. It is a great introduction to learning how to read SQL Server Execution Plans. There are lots of good examples and screen shots describing how the server is interpreting the commands being executed.
However, one should note that the book is NOT about how the plans will help you to improve your queries. Instead, knowing how to read through the various execution plans will help the reader to understand where problems might exist.
Yes, that's what this book is about - understanding execution plans. It starts with what happens when you execute a query where the author talks about the parser, algebraizer, the optimizer and the 'executor'!
If you're new to understanding the execution plan concepts, I'd suggest you take the first two chapters slowly and thoroughly. I did this and it helped me to read through the plans myself and I only skimmed over the paragraphs to confirm my knowledge.
This book doesn't tell you how to write better queries directly, but by enabling you to understand how the optimizer works, you'll end up writing better queries yourself.
The book does take you down some real advanced topics like cursors and parallelism. I don't think I'll use those tips for the most part of my work, but it was great to know them nevertheless.
A clear and concise book on how to read SQL Server Execution Plans and understand the different pieces involved. It has many great examples to illustrate plans generated by T-SQL in the text and shows how they change with various modifications. It's been awhile since I've read a technology book that was this well organized.