实践SQLServer Tuning
生活随笔
收集整理的這篇文章主要介紹了
实践SQLServer Tuning
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
已有的系統業務數據屬性多,表之間關系緊密。單表數據量(5481 row(s) affected)級別(其中三四個主表),其他表數據量較小。
0)使用set statistics生成輔助信息參考。
set statistics io on set statistics time on set statistics profile onset statistics io off set statistics time off set statistics profile off1)使用Include Actual Execution plan & Include Client Statistics做參考。
2) 短路表達式的面向業務優化:
or表達式常用的搜索條件置前。
@cls_date_start is null and @cls_date_end is null)or (@cls_date_start is not null and @cls_date_end is null and expct_cls_dt >= @cls_date_start)or (@cls_date_start is null and @cls_date_end is not null and expct_cls_dt <= @cls_date_end)or (@cls_date_start is not null and @cls_date_end is not null and expct_cls_dt between @cls_date_start and @cls_date_end)3) 針對執行計劃的分析。
http://www.blogjava.net/jiabao/archive/2008/04/08/191595.html?這篇文章Mark一下,淺顯又深入。
4) 對臨時表添加cluster index與unique index。以讓其為連接所用并避免較大表的table scan。貌似效果不錯。
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的实践SQLServer Tuning的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 艾丽艾尔大(艾丽艾尔)
- 下一篇: 契卡(说一说契卡的简介)