精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。需要全文内容也请联系孙老师。
DBCC SQLPERF("waitstats")
SET STATISTICS IO ON
and
SET STATISTICS PROFILE ON
STATISTICS IO 统计
Can be useful in telling you which tables it is doing the most amount of table scans, logical reads & physical reads (I use these three to focus on which part of the query plan needs the most tuning)会告知你哪个表在如下过程中占用的时长最长,过程有:表扫描、逻辑读和物理读(我使用这3个参数来关注查询方案的哪个部分需要最多调整)
STATISTICS PROFILE
Will primarily return the query plan in a tabular format, you can then look at the IO and CPU columns for what is costing the most amount in the query (is it the table scan on your temp table vs the sort it does to insert into your clustered key, etc...)主要以表格形式返回查询方案性能分析,你能查看IO和CPU列,找出最费时的查询语句(是临时表的表扫描或插入到簇键,等等)
修改了内存最大,每个查询大小
WRITELOG 3091389 7.321531E+07 229212
SOS_SCHEDULER_YIELD 4898103 37970 37206
ASYNC_NETWORK_IO 391584 249976 20389
LAZYWRITER_SLEEP 1527662 1.520963E+09 7768
LCK_M_U 16156 303000 6224
select * from sys.dm_os_performance_counters where counter_name like '%Log%'
公司内机器每秒50个请求,WRITELOG小,IO请求小.机房慢.解释:服务器压力大,,公司内压力低,效率高.机房机器硬盘是RAID1.
因为长时间慢,还是磁盘自己慢