Is there a way how to find out what is cached in SQL Server 2008 R2? I have found the following nice article: http://blog.sqlauthority.com/2010/06/17/sql-server-data-pages-in-buffer-pool-data-stored-in-memory-cache . However, I would like to know how much data (e.g. in percentage and KB) are stored of each table and index. Is there some simple way how to obtain such data?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
migrated from stackoverflow.com May 31 '13 at 16:49
This question came from our site for professional and enthusiast programmers.
You can find whats stored in the buffer pool (data cache) using below query :
From here :
Excellent reference : Inside the Storage Engine: What’s in the buffer pool? by Paul Randal.
You can use dynamic management view to list currently cached pages and filter them by database_id:
Then you can see
It'll be up to you, however, to combine the results, and it doesn't seem an easy task :). Let us know when you come up with effective way to do this.