Database Reference
In-Depth Information
JOIN Production.Product AS p
ON sod.ProductID = p.ProductID
JOIN Production.ProductModel AS pm
ON p.ProductModelID = pm.ProductModelID
JOIN Production.ProductSubcategory AS ps
ON p.ProductSubcategoryID = ps.ProductSubcategoryID
JOIN Production.ProductCategory AS pc
ON ps.ProductCategoryID = pc.ProductCategoryID
WHERE soh.CustomerID = 29658;
When this query is run, the execution plan in Figure 14-5 , a nontrivial plan for sure, is returned.
Figure 14-5. Nontrivial execution plan
I realize that this execution plan is hard to read, but don't try to read it. The important point to take away is that
it involves quite a few tables, each with indexes and statistics that all had to be taken into account to arrive at this
execution plan. The first place you can go to look for information about the optimizer's work on this execution plan
is the property sheet of the first operator, in this case the T-SQL SELECT operator, at the far left of the execution plan.
Figure 14-6 shows the property sheet.
 
Search WWH ::




Custom Search