sql-server – 在SQL Server查询中关闭NOCOUNT有什么优点和缺点?

前端之家收集整理的这篇文章主要介绍了sql-server – 在SQL Server查询中关闭NOCOUNT有什么优点和缺点?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
sql Server查询关闭NOCOUNT有什么优点和缺点?

解决方法

sql BOL:

SET NOCOUNT ON prevents the sending of
DONE_IN_PROC messages to the client
for each statement in a stored
procedure. For stored procedures that
contain several statements that do not
return much actual data,setting SET
NOCOUNT to ON can provide a
significant performance boost
,because
network traffic is greatly reduced.

详见http://msdn.microsoft.com/en-us/library/ms189837.aspx.
此外,关于sqlServerCentral的这篇文章对此有很大的了解:
Performance Effects of NOCOUNT

猜你在找的MsSQL相关文章