--DBA 需要知道N种对数据库性能的监控SQL语句 -- IO问题的SQL内部分析 下面的DMV查询可以来检查当前所有的等待累积值. Select wait_type, waiting_tasks_count, wait_time_ms from sys.dm_os_wait_stats where wait_type like 'PAGEIOLATCH%' order by wait_type --可以通过运行下面的查询得到每个文件的信息,了解哪个文件经常要做读(num_of_reads/
分析表 analyze table tablename compute statistics for all indexes; analyze table tablename compute statistics for all indexed columns; analyze table tablename compute statistics for table; 监控事例的等待 select event,sum(decode(wait_Time,0,0,1)) "Prev", s