What are the advantages and disadvantages of turning NOCOUNT off in SQL server queries?

后端 未结 7 719
故里飘歌
故里飘歌 2021-01-04 03:35

What are the advantages and disadvantages of turning NOCOUNT off in SQL server queries? ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

7条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 04:26

    It simply stops the message that shows the # of rows effected for being sent/displayed, which provides a performance benefit, especially if you have many statements that will return the message. It improves performance since less data is being sent over the network (between the sql server and front end).

    More at BOL: SET NOCOUNT

提交回复
热议问题