I understand that whenever SQL server receives a query it looks in the cache plan for any matching execution plans for that query. However, most of the resources that I encountered don't specify which component is in charge of this lookup. This article suggests that it's the Buffer Manager, but I failed to find any evidence for this in Microsoft's Query processing architecture guide. On the other hand, the speaker in this presentation (around 42:43) seems to suggest that it's the Cmd Parser. So, which one is it?

1 Answer 1


Ref: Optimize SELECT statements

The input to the Query Optimizer consists of the query, the database schema (table and index definitions), and the database statistics. The output of the Query Optimizer is a query execution plan, sometimes referred to as a query plan or execution plan.

From the above-quoted text, Query Optimzer's job is to create the execution plan. Hence you can infer that Query Optimizer will check the plan cache for the existence of a plan for the same query hash.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.