Execution Plan Selection

At this point in the query optimization process, the Query Optimizer has examined the entire query and estimated the costs of all possible access paths for the SARGs and join clauses and also the various join orders and query-processing strategies. It now needs to choose which plan to pass on to SQL Server for execution.

For a single table query, choosing the best query plan typically involves choosing the access path and query processing strategy that results in the most efficient execution plan; usually, this is the plan that requires the fewest number of logical I/Os and typically requiring the least resources to process the query on that table. However, sometimes the Query Optimizer may choose a plan that returns ...

Get Microsoft® SQL Server 2012 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.