Chapter 15. Advanced Query Tuning Hints and Plan Guides

In this chapter we will cover:

  • Using the NOLOCK table query hint
  • Using the FORCESEEK and INDEX table hints
  • Optimizing a query using an object plan guide
  • Implementing a fixed execution plan using a SQL plan guide

Introduction

When you submit a SQL query to the SQL Server, SQL Server first parses the query to check whether it's syntactically correct or not. Once the query is parsed, a parse tree is generated. The parse tree becomes the input of the next process, which is known as algebraization. The algebrizer resolves all the names, data types, and aliases of columns of various objects and creates a query tree, which the query optimizer can understand. Query optimizer optimizes queries, depending ...

Get Microsoft SQL Server 2012 Performance Tuning Cookbook 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.