.Net技術專攻區

.Net技術總結區

清除缓存,计算Sql Server查询效率

--优化之前

DBCC FREEPROCCACHE

DBCC DROPCLEANBUFFERS

SET STATISTICS IO ON

select Dtime,Value from dbo.his20140825 WHERE Dtime>='' AND Dtime<='' AND MgrObjId='' AND Id=''

SET STATISTICS IO OFF

 

 

--优化之后

DBCC FREEPROCCACHE

DBCC DROPCLEANBUFFERS

SET STATISTICS IO ON

select Dtime,Value from dbo.his20140825 WHERE MgrObjId='' AND Id='' AND Dtime>='' AND Dtime<=''

SET STATISTICS IO OFF

posted on 2017-01-02 16:07  Davidhuang  阅读(395)  评论(0编辑  收藏  举报

导航