May 2019
Intermediate to advanced
484 pages
11h 23m
English
The root node of a plan has a few properties that are important for understanding the context of the execution. Different trace flags or SET options change the execution context and may drive query optimization choices, so having this information persisted in the showplan is a valuable tool.
The following example shows a query executed in the AdventureWorks sample database that allows us to examine most of these properties:
SELECT *FROM Sales.SalesOrderDetail AS sodINNER JOIN Production.Product AS p ON sod.ProductID = p.ProductIDORDER BY Style DESCOPTION (MAXDOP 1);
The preceding query generates the following execution plan:
Right-click on the root node of the plan, open the context menu, and click on Properties:
Read now
Unlock full access