Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been reading about the SQL Server plan cache and optimizing for adhoc workloads, etc. I'm fairly new to the topic and have a few general questions to help paint a better picture:

Suppose I have several databases running under one instance of SQL Server:

(1) Is there a different plan cache per database? More specifically, when I examine sys.dm_exec_cached_plans am I looking at database-specific information or instance-wide information?

(2) Is 'optimize for adhoc workloads' set per database or per instance?

share|improve this question
up vote 3 down vote accepted

Both the Plan Cache and 'optimize for adhoc workloads' are per instance.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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