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

推荐订阅源

N
News and Events Feed by Topic
S
Security @ Cisco Blogs
S
Secure Thoughts
Attack and Defense Labs
Attack and Defense Labs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recent Commits to openclaw:main
Recent Commits to openclaw:main
H
Hacker News: Front Page
博客园 - 叶小钗
H
Heimdal Security Blog
Microsoft Security Blog
Microsoft Security Blog
Forbes - Security
Forbes - Security
AI
AI
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Troy Hunt's Blog
罗磊的独立博客
Application and Cybersecurity Blog
Application and Cybersecurity Blog
爱范儿
爱范儿
GbyAI
GbyAI
The Last Watchdog
The Last Watchdog
TaoSecurity Blog
TaoSecurity Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
D
DataBreaches.Net
Recent Announcements
Recent Announcements
Schneier on Security
Schneier on Security
C
Cisco Blogs
美团技术团队
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
月光博客
月光博客
雷峰网
雷峰网
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
Arctic Wolf
B
Blog RSS Feed
Cisco Talos Blog
Cisco Talos Blog
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
V2EX - 技术
V2EX - 技术
Y
Y Combinator Blog
N
News and Events Feed by Topic
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
Security Archives - TechRepublic
Security Archives - TechRepublic
G
GRAHAM CLULEY
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
The Hacker News
The Hacker News

博客园 - 亦心

教你如何查找并下载某手某音上的外部视频 求出两个字符串中最大长度的相同的子字符串 年会抽奖软件 正则表达式+编码转换小工具 sql语句跨库导入导出 Google maps API开发(二) - 亦心 Google maps API开发(一) - 亦心 Javascript树型菜单(含源码) Javascript结合XML省市级联 - 亦心 - 博客园 ASP.NET程序读取二代身份证(附源码) - 亦心 - 博客园 仿百度搜索智能提示(纯JS实现) 发现一个免费申请国际域名的地方!! asp.net性能优化 分享一个分页存储过程和分页函数 利用反射实现通用的DataReader转List、DataReader转实体类 任意类型转换成json tsql字符串操作 javascript正则表达式 - 亦心 - 博客园 access、excel取随机n条记录
测试SQL Server执行时间和CPU时间
亦心 · 2009-11-23 · via 博客园 - 亦心

  在需要测试sql语句或者存储过程性能的时候可以用得上

  CHECKPOINT --用于检查当前工作的数据库中被更改过的数据页或日志页,并将这些数据从数据缓冲器中强制写入硬盘
  GO
  
DBCC FreeProcCache --从缓冲池中删除所有缓冲区
  DBCC DropCleanBuffers --从过程高速缓存中删除所有元素
  GO
  
DBCC FreeSystemCache('ALL') ;--清除SQL实例的计划缓存
  GO
  
SET Statistics IO ON
  
SET Statistics TIME ON
  
GO
 
---------------------------
 DECLARE @b datetime
 
DECLARE @e datetime
 
set @b = getdate();
 
select COUNT(*from test1;
 
set @e = getdate();
 
select DATEDIFF(ms,@b,@e)
 
----------------------------
 SET Statistics IO OFF
 
SET Statistics TIME OFF
 
GO
 
DBCC DropCleanBuffers
 
DBCC FreeProcCache

执行结果如下:---------------------------------------------------------

每天进步一点点...