An execution plan in simple words is the result of SQL Server query optimizer’s attempt to estimate the most appropriate and efficient way to implement T-SQL queries submitted by users. Execution plan reflects, in other words can tell us how a query will be executed (estimated plan) or how a query is being executed (actual plan). They are one of the means of identifying and troubleshooting bad performing queries. By looking at the execution plans, we can identify the exact statement(s) hurting performance. In first exercise we will understand and capture execution plans in graphical, text and XML format and the basics of how to read them. In the second exercise we will understand different plan icons and how to interpret different plan operators and in third exercise we will explore how can we control execution plans using hints.
Exercise 1: Understanding and capturing execution plans
Exercise 2: Reading Graphical Execution Plans
Exercise 3: Controlling Execution Plans with hints