Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
Optimization: Set Nocount On
From Wiki
When you have a lot of updates and inserts or deletes in a stored procedure it is good to set nocount to on. SQL server can become really chatty when this setting is off; this will waste bandwith and CPU power. If a proc is called 30 times a second and you do 3 DML operations then that will result in 90 n row(s) affected) messages
set nocount on should be the first statement in the proc after the parameters and the AS. Example:
- CREATE PROC Employee
- @Param1 INT
- AS
- SET NOCOUNT ON
- ...rest OF PROC
Contributed by: --SQLDenis 15:25, 31 May 2008 (GMT)
Part of SQL Server Programming Hacks - 100+ List
Section Query Optimization



LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.