SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

AskSQLTeam
Ask SQLTeam Question

USA
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?

coolerbob
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

ThreePea
Yak Posting Veteran

USA
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.

3P
Go to Top of Page

coolerbob
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:
http://www.microsoft.com/downloads/details.aspx?familyid=1d3a4a0d-7e0c-4730-8204-e419218c1efc&displaylang=en
Go to Top of Page

platinumriver
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.

http://blogs.technet.com/vipulshah/archive/2007/09/24/understanding-query-plan-cache-in-sql-2005-sp2-why-it-s-changed-from-sql-2005-rtm-sp1.aspx

http://blogs.msdn.com/sqlprogrammability/archive/2007/01/22/3-0-changes-in-caching-behavior-between-sql-server-2000-sql-server-2005-rtm-and-sql-server-2005-sp2.aspx
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000