谁占用了我的Buffer Pool?
来源:互联网 发布:java文件大小的单位 编辑:程序博客网 时间:2024/06/04 18:37
1. Buffer Pool的内存主要是由那个数据库占了?
SELECT count(*)*8 as cached_pages_kb,CASE database_id
WHEN 32767 THEN 'ResourceDb'
ELSE db_name(database_id)
END AS Database_name
FROM sys.dm_os_buffer_descriptors
GROUP BY db_name(database_id) ,database_id
ORDER BY cached_pages_kb DESC;
2. 再具体一点,当前数据库的哪个表或者索引占用Pool缓冲空间最多?
SELECT count(*)*8 AS cached_pages_kb
,obj.name ,obj.index_id,b.type_desc,b.name
FROM sys.dm_os_buffer_descriptors AS bd
INNER JOIN
(
SELECT object_name(object_id) AS name
,index_id ,allocation_unit_id,object_id
FROM sys.allocation_units AS au
INNER JOIN sys.partitions AS p
ON au.container_id = p.hobt_id
AND (au.type = 1 OR au.type = 3)
UNION ALL
SELECT object_name(object_id) AS name
,index_id, allocation_unit_id,object_id
FROM sys.allocation_units AS au
INNER JOIN sys.partitions AS p
ON au.container_id = p.partition_id
AND au.type = 2
) AS obj
ON bd.allocation_unit_id = obj.allocation_unit_id
LEFT JOIN sys.indexes b on b.object_id = obj.object_id AND b.index_id =obj.index_id
WHERE database_id = db_id()
GROUP BY obj.name, obj.index_id ,b.name,b.type_desc
ORDER BY cached_pages_kb DESC;
3.Buffer Pool缓冲池里面修改过的页总数大小。这个比较容易:
SELECT count(*)*8 as cached_pages_kb,
convert(varchar(5),convert(decimal(5,2),(100-1.0*(select count(*) fromsys.dm_os_buffer_descriptors b where b.database_id=a.database_id andis_modified=0)/count(*)*100.0)))+'%' modified_percentage
,CASE database_id
WHEN 32767 THEN 'ResourceDb'
ELSE db_name(database_id)
END AS Database_name
FROM sys.dm_os_buffer_descriptors a
GROUP BY db_name(database_id) ,database_id
ORDER BY cached_pages_kb DESC;
- 谁占用了我的Buffer Pool?
- 谁占用了我的Buffer Pool
- 谁占用了我的Buffer Pool?
- 谁占用了我的Buffer Pool?
- 谁占用了我的Buffer Pool?
- 脚本之找出占用了Buffer Cache里大量的buffer的数据库对象
- buffer pool
- 是什么占用了我的分区
- 7 buffer pool的组织结构
- default/keep/recycle buffer pool 的区别
- mysqldump造成Buffer Pool污染的研究
- 千丝万缕的FGC与Buffer Pool
- 千丝万缕的FGC与Buffer Pool
- 千丝万缕的FGC与Buffer Pool
- KEEP Buffer Pool/recycle pool
- 如何查看谁占用了我的端口(windows、linux)
- 我的asp.net程序当前占用了多少内存?
- 我的asp.net程序当前占用了多少内存?
- 端口映射实例说明
- HTML5/CSS3简易联系表单 扁平化风格
- java 多线程 ReentrantReadWriteLock 使用
- ubuntu下解决解压zip文件中文文件名乱码问题
- 我的openwrt学习笔记(三十):webserver之uhttpd
- 谁占用了我的Buffer Pool?
- Python默认编码错误SyntaxError: Non-ASCII character '\xe5'之解决方法
- This virtual machine is configured for 64-bit guest operating systems. However, 64-bit operation is
- Visio使用技巧—框图多输入的实现
- Android 服务的五大级别
- 使用symbolicatecrash翻译crash log日志
- iOS开发 -- 设置tableView的边框
- Nginx+uWSGI+Django 好文
- DNS Prefetch DNS预解析