Database Reference
In-Depth Information
If a query contains an implicit data conversion, then the normalization process adds an appropriate step to the
query tree. The process also performs some syntax-based optimization. For example, if the following query is submitted,
then the syntax-based optimization transforms the syntax of the query, as shown in the T-SQL in Figure 14-2 taken from
the SELECT operator properties in the execution plan, where BETWEEN becomes >= and <= .
SELECT soh.AccountNumber,
soh.OrderDate,
soh.PurchaseOrderNumber,
soh.SalesOrderNumber
FROM Sales.SalesOrderHeader AS soh
WHERE soh.SalesOrderID BETWEEN 62500 AND 62550;
Figure 14-2. Syntax-based optimization
You can also see some evidence of parameterization, discussed in more detail later in this chapter. The execution
plan generated from the query looks like Figure 14-3 .
Figure 14-3. Execution plan with a warning
 
Search WWH ::




Custom Search