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 2014 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.