Execution Plans, Where do I start
Channel: Hugo Kornelis
Date: 23/08/2021

SQL (the language) is not a third generation language, where the developer tells the computer every step it needs to take. It is a declarative language that specifies the required results. SQL Server itself will figure out what steps it takes to get to those results. Most of the time, that works very well.
But sometimes it doesn’t. Sometimes a query takes too much time. You need to find out why, so you can fix it. That’s where the execution plan comes in. In the execution plan, SQL Server exposes exactly which steps it took for your query, so you can see why it’s slow.
However, execution plans can be daunting to the uninitiated. Especially for complex queries. Where do you even start?
In this session you will learn how to obtain execution plans. and how to start reading and understanding them.

Recommended links:
* Slide deck and demo code: https://sqlserverfast.com/presentations/presentation-resources/
* Upcoming speaking engagements: https://sqlserverfast.com/presentations/upcoming-speaking-engagements/
* SQLServerFast Execution Plan Video Training: https://sqlserverfast.com/video/
* SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/
* SQL Server Execution Plans, 3rd edition, by Grant Fritchey: https://www.red-gate.com/products/dba/sql-monitor/entrypage/execution-plans
* Pluralsight technical training: https://www.pluralsight.com/

Sections:
0:00 Introduction
2:13 Why do execution plans matter?
11:33 Where can you find the execution plan?
24:38 How do you read an execution plan?
33:53 Common misunderstanding #1: Cost percentages
45:52 Common misunderstanding #2: Read direction
51:36 Properties
1:03:38 Two examples
1:19:00 Wrap up