Summary

The SQL Server Query Optimizer has improved over the years, taking advantage of new techniques and algorithms to improve its capability to find the most efficient execution plan. Understanding how queries are optimized and what information the Query Optimizer uses to generate and select an execution plan will help you write more efficient queries and choose better indexes. To help the Query Optimizer, you should at least try to write queries that can be optimized effectively by avoiding the common query optimization problems discussed in this chapter.

Most of the time, the Query Optimizer chooses the most efficient query plan. When it doesn’t, the reason might be problems with the way the query itself is written, out-of-date or unavailable ...

Get Microsoft SQL Server 2014 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.