Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: What Query Plans are in SQL Server's Memory?
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ask SQLTeam Question

0 Posts

Posted - 07/24/2007 :  08:50:14  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote

SQL Server memory is primarily used to store data (buffer) and query plans
(procedure cache). In this article I'll show how much memory is allocated to the procedure
cache (RAM). I'll explain how to determine what plans are in the cache and how
often they're used.

Read What Query Plans are in SQL Server's Memory?

Aged Yak Warrior

United Kingdom
841 Posts

Posted - 07/25/2007 :  07:04:23  Show Profile  Reply with Quote
This is brilliant I think. Thanks very much. It tells me more about what's going on; things that could be harder to spot by simply setting up a trace.

Edited by - coolerbob on 08/10/2007 05:17:47
Go to Top of Page

Yak Posting Veteran

83 Posts

Posted - 07/27/2007 :  09:58:15  Show Profile  Visit ThreePea's Homepage  Reply with Quote
Yes, good stuff, Graz. 2005 gives us some great tools in this regard. We are using 2005 RTM and have 55GB of RAM set aside for SQL Server. Of that, 23 GB is allocated to plan cache! Wow. This is one of the main reasons we are hesitant about moving to sp2 - the algorithm for allocating memory to the plan cache changes drastically. Our calculations show that with sp2 our plan cache will be capped at 8GB. That's a 65% drop, which means plans will be swapped in/out at a much higher rate than right now. Our average CPU utilization is already pretty high, and since recompiling is CPU-intensive, you can see why we are nervous.

Anyway, I'll be taking these DMVs and going into much deeper detail on their usage, as well as some other related DMVs, at the PASS conference this year. In fact, we've put a graphical front-end on these DMVs, and I'll be showing our production system live during the session. DBA-309 if you're interested.

Go to Top of Page

Aged Yak Warrior

United Kingdom
841 Posts

Posted - 08/10/2007 :  05:16:59  Show Profile  Reply with Quote
Also, this and more functionality is included in this tool:
Go to Top of Page

Starting Member

1 Posts

Posted - 11/30/2007 :  00:36:16  Show Profile  Reply with Quote
Here are a couple of good links to why the plan cache size was changed. Having a very large plan cache rarely results in improved performance.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2019 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000