sql显示sql语句的执行时间及cpu消耗

来源:互联网 发布:linux编程软件 编辑:程序博客网 时间:2024/05/06 01:39



-- 清空缓存计划 慎用
 
DBCC FREEPROCCACHE              -- 从过程缓存中删除所有元素
 
DBCC DROPCLEANBUFFERS           -- 从缓冲池中删除所有清除缓冲区。
 
DBCC FREESYSTEMCACHE( 'Tempdb' )   -- 从所有缓存中释放所有未使用的缓存条目


 set statistics profile on
set statistics io on
set statistics time on
go

//自己的sql
SELECT  MAX(AuctionPrice) as AuctionPriceNum--,AuctionID
--,TvaID,AuctionOrder
 FROM Lubao_AuctionVehicleResultLog  --group by AuctionID--,TvaID,AuctionOrder
go
set statistics profile off
set statistics io off
set statistics time off

0 0
原创粉丝点击