zoukankan
html css js c++ java
SQL Server 调优将会用到的非常好的DMV
Code
1
SELECT
creation_time N
'
语句编译时间
'
2
,last_execution_time N
'
上次执行时间
'
3
,total_physical_reads N
'
物理读取总次数
'
4
,total_logical_reads
/
execution_count N
'
每次逻辑读次数
'
5
,total_logical_reads N
'
逻辑读取总次数
'
6
,total_logical_writes N
'
逻辑写入总次数
'
7
, execution_count N
'
执行次数
'
8
, total_worker_time
/
1000
N
'
所用的CPU总时间ms
'
9
, total_elapsed_time
/
1000
N
'
总花费时间ms
'
10
, (total_elapsed_time
/
execution_count)
/
1000
N
'
平均时间ms
'
11
,
SUBSTRING
(st.
text
, (qs.statement_start_offset
/
2
)
+
1
,
12
((
CASE
statement_end_offset
13
WHEN
-
1
THEN
DATALENGTH
(st.
text
)
14
ELSE
qs.statement_end_offset
END
15
-
qs.statement_start_offset)
/
2
)
+
1
) N
'
执行语句
'
16
FROM
sys.dm_exec_query_stats
AS
qs
17
CROSS
APPLY sys.dm_exec_sql_text(qs.sql_handle) st
18
where
SUBSTRING
(st.
text
, (qs.statement_start_offset
/
2
)
+
1
,
19
((
CASE
statement_end_offset
20
WHEN
-
1
THEN
DATALENGTH
(st.
text
)
21
ELSE
qs.statement_end_offset
END
22
-
qs.statement_start_offset)
/
2
)
+
1
)
not
like
'
%fetch%
'
23
ORDER
BY
total_elapsed_time
/
execution_count
DESC
;
24
查看全文
相关阅读:
Python 爬虫-正则表达式
Python 爬虫-信息的标记xml,json,yaml
Python 爬虫-BeautifulSoup
bzoj 1491
bzoj 1406 数论
Codeforces Round #496 (Div. 3) E2
2017-2018 ACM-ICPC Northern Eurasia (Northeastern European Regional) Contest (NEERC 17) 日常训练
Codeforces Round #496 (Div. 3) F
bzoj 1415 期望dp + 记忆化搜索
bzoj 1483 链表 + 启发式合并
原文地址:https://www.cnblogs.com/killkill/p/1304831.html
最新文章
1025.最大报销额
1027.欧拉回路
1024.畅通工程
笨小猴pascal题解
机器翻译pascal程序
Oliver的救援pascal程序
求细胞数量pascal题解
最优乘车pascal程序
小学生的故事
翻币问题pascal程序
热门文章
NOIP2016普及组第三题——海港
NOIP2016普及组第四题——魔法阵
写代码的小女孩
Python 进程与线程
Python time库
Python random库
Python 注意事项
Python 爬虫-获得大学排名
python-迭代器和生成器
Python 格式化输出
Copyright © 2011-2022 走看看