久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

SET NOCOUNT 的最佳位置在哪里?

Where#39;s the best place to SET NOCOUNT?(SET NOCOUNT 的最佳位置在哪里?)
本文介紹了SET NOCOUNT 的最佳位置在哪里?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

對于在專用 SQL Server 上運行的大型數(shù)據(jù)庫(數(shù)千個存儲過程),最好在每個存儲過程的頂部包含 SET NOCOUNT ON,還是在服務(wù)器級別(屬性 -> 連接 -> 無計數(shù)"復(fù)選框)?這聽起來像是 DRY 原則(不要重復(fù)自己"),并且該選項應(yīng)該只設(shè)置在一個地方.如果 SQL Server 還托管了其他數(shù)據(jù)庫,那將反對在服務(wù)器級別設(shè)置它,因為其他應(yīng)用程序可能依賴于它.SET NOCOUNT 的最佳位置在哪里?

For a large database (thousands of stored procedures) running on a dedicated SQL Server, is it better to include SET NOCOUNT ON at the top of every stored procedure, or to set that option at the server level (Properties -> Connections -> "no count" checkbox)? It sounds like the DRY Principle ("Don't Repeat Yourself") applies, and the option should be set in just one place. If the SQL Server also hosted other databases, that would argue against setting it at the server level because other applications might depend on it. Where's the best place to SET NOCOUNT?

推薦答案

將其設(shè)為服務(wù)器的默認設(shè)置(除歷史原因外,將設(shè)為默認設(shè)置).我從一開始就對所有服務(wù)器執(zhí)行此操作.有沒有想過為什么它是 SET NOCOUNT ON 而不是 SET COUNT OFF?這是因為在 Sybase 時代,唯一的 UI 是 CLI;當查詢可能沒有結(jié)果時顯示計數(shù)是很自然的,因此沒有指示它已完成.

Make it the default for the server (which it would be except for historical reasons). I do this for all servers from the start. Ever wonder why it's SET NOCOUNT ON instead of SET COUNT OFF? It's because way way back in Sybase days the only UI was the CLI; and it was natural to show the count when a query might show no results, and therefore no indication it was complete.

這篇關(guān)于SET NOCOUNT 的最佳位置在哪里?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Converting Every Child Tags in to a Single Column with multiple Delimiters -SQL Server (3)(將每個子標記轉(zhuǎn)換為具有多個分隔符的單列-SQL Server (3))
How can I create a view from more than one table?(如何從多個表創(chuàng)建視圖?)
Create calculated value based on calculated value inside previous row(根據(jù)前一行內(nèi)的計算值創(chuàng)建計算值)
How do I stack the first two columns of a table into a single column, but also pair third column with the first column only?(如何將表格的前兩列堆疊成一列,但也僅將第三列與第一列配對?) - IT屋-程序員軟件開發(fā)技
Recursive t-sql query(遞歸 t-sql 查詢)
Convert Month Name to Date / Month Number (Combinations of Questions amp; Answers)(將月份名稱轉(zhuǎn)換為日期/月份編號(問題和答案的組合))
主站蜘蛛池模板: 国产日韩欧美一区二区在线播放 | 欧美亚洲另类丝袜综合网动图 | 亚洲精品一区二区三区免 | 国产一区在线看 | 国产精品一区2区 | 欧美日韩综合一区 | 国产999精品久久久 精品三级在线观看 | 久久久久久久综合 | 交专区videossex农村 | 久草欧美 | 一级毛片视频在线观看 | 午夜欧美 | 影音先锋中文在线 | 欧美日韩免费一区二区三区 | 欧美a在线 | 亚洲精品小视频在线观看 | 中文字幕在线观看视频网站 | 天天草天天操 | 欧美亚州 | 欧美亚洲在线视频 | 国产激情综合五月久久 | 九九精品视频在线 | 国产成人一区二区三区久久久 | 国产精品日韩欧美一区二区三区 | 精品视频一区二区 | 国产精品一区二区免费 | 四虎免费视频 | 欧美午夜视频 | 日韩av在线不卡 | 香蕉视频黄色 | 欧美激情综合 | 亚洲视频自拍 | 日韩精品一区二区久久 | 精品国产精品国产偷麻豆 | 羞羞的视频免费在线观看 | 欧美精品成人影院 | 亚洲国产一区二区视频 | 欧美日韩专区 | 国产精品激情 | 一区二区视屏 | 黄色高清视频 |