CHAPTER 22

image

Hints

By Jonathan Gennick

SQL Server’s query optimization process is responsible for producing a query execution plan when a SELECT query is executed. Typically SQL Server will choose an efficient plan over an inefficient one. When this doesn’t happen, you will want to examine the query execution plan, table statistics, supporting indexes, and other factors that are discussed in more detail in Chapters 21 and 23. Ultimately, after researching the query’s performance, you may decide to override the decision-making process of the SQL Server query optimizer by using hints.

 Caution  You should almost always let SQL Server’s query optimization ...

Get SQL Server 2012 T-SQL Recipes: A Problem-Solution Approach 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.