September 2010
Intermediate to advanced
1704 pages
111h 8m
English
In SQL Server 2008, if a SQL statement is executed without parameters, the Query Optimizer parameterizes the statement internally to increase the possibility of matching it against an existing execution plan. This process is called simple parameterization, sometimes referred to as auto-parameterization. Simple parameterization is somewhat limited in that it can parameterize only a relatively small number of queries that match a small number of very simple and strictly defined query templates. For example, simple parameterization is not possible for queries that contain any of the following query elements:
• References to more than one table
• IN clauses or OR expressions
• UNION
• Any query hints
• DISTINCT
• TOP
• Subqueries ...