日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

实践SQLServer Tuning

發布時間:2024/9/20 数据库 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 实践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 off

1)使用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的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。