-- 清空缓存计划 慎用
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
本文介绍了几种用于SQL Server性能调优的方法,包括清空缓存、设置统计信息等操作,并提供了一个具体的SQL查询示例来展示如何应用这些技巧。
1438

被折叠的 条评论
为什么被折叠?



