--扫描表信息
DBCC SHOWCONTIG(Member_Track)
--当前所有的等待累计值
SELECT * FROM sys.dm_os_wait_stats WHERE wait_type LIKE 'pageiolatch%'
--文件的读写量 自sqlsever 上次启动以来的历史统计信息
SELECT db.database_id 数据库id , db.name AS 数据库名,f.fileid AS 文件ID , f.filename AS 文件名,
i.num_of_reads AS 读取数量,
i.num_of_bytes_read AS 读取字节,
i.io_stall_read_ms AS 读等待时间,
i.num_of_writes AS 写数量,
i.num_of_bytes_written 写字节,
i.io_stall_write_ms 写等待时间,
i.io_stall IO延时 ,
i.size_on_disk_bytes
FROM sys.databases db INNER JOIN sys.sysaltfiles f ON db.database_id=f.dbid
INNER JOIN sys.dm_io_virtual_file_stats(NULL,NULL ) i ON i.database_id=f.dbid AND i.file_id= f.fileid
WHERE db.name='crm'
--当前服务器每个处于挂起状态的请求。
SELECT * FROM sys.dm_io_virtual_file_stats(NULL,NULL) t1 INNER JOIN
sys.dm_io_pending_io_requests AS t2 ON t1.file_handle=t2.io_handle