惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
小众软件
小众软件
美团技术团队
Martin Fowler
Martin Fowler
爱范儿
爱范儿
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
J
Java Code Geeks
B
Blog
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
博客园 - Franky

博客园 - Qiozi

Window server 2022 Datacenter, 布署 asp.net 3.5 后,自定义控件无法运行,错误提示:未知的服务器标记:”****” sql server 2019,安装多个实例 配置镜像, msoledbsql.msi 无法安装 CMD, 按日期备份mysql数据库, 并删除30天前的备份 WPS excel 操作,组件服务里找不到wps组件, 程序报:检索 COM 类工厂中 CLSID 为 {00024500-0000-0000-C000-000000000046} 的组件时失败 tasklist, 查找进程,杀掉进程 redis-cli --cluster create 群集 查出当前数据库,所有数据表索引碎片情况。 windows 2012 R2 系统下, redis 主从配置 mysql 5.7*, 报错:this is incompatible with DISTINCT [EndOfStreamException: 尝试读取超出流末尾的内容。] .net MVC 中,使用 BundleConfig 合并js文件后,网站无法运行,发现代码丢失问题。 Ensure that HttpConfiguration.EnsureInitialized() is called in the application's startup code after Windows service 安装命令 Get http://IP:Port/v2/: dial tcp IP:Port: connect: connection refused 如何创建 Dockerfile? Windows 10 系统, 修改Docker容器系统时间区域, Docker 容器里连接远程 Sql Server 数据库。 SQL SERVER 2016数据库:删除用户时提示“数据库主体在该数据库中拥有架构” Docker 容器里,添加 Ping 功能。
sql server 查询CPU占用时间最大的语句。
Qiozi · 2020-12-01 · via 博客园 - Qiozi

代码是园子里找的:

SELECT TOP 20
total_worker_time/execution_count AS avg_cpu_cost, plan_handle,
execution_count,
(SELECT SUBSTRING(text, statement_start_offset/2 + 1,
(CASE WHEN statement_end_offset = -1
THEN LEN(CONVERT(nvarchar(max), text)) * 2
ELSE statement_end_offset
END - statement_start_offset)/2)
FROM sys.dm_exec_sql_text(sql_handle)) AS query_text
FROM sys.dm_exec_query_stats
ORDER BY [avg_cpu_cost] DESC

posted @ 2020-12-01 15:17  Qiozi  阅读(287)  评论(0)    收藏  举报