|
Improve performance of Stored Procedures by using SET NOCOUNT ONProvided by Steve Clark, Project ManagerIn Microsoft SQL Server, when executing a Transact-SQL statement, the number of ‘rows affected’ is returned by default. As an example, execute the following in SQL Analyzer:
When this query is executed, the messages pane displays:
Because additional processing time is needed to ascertain the number of rows affected, turning off this feature can reduce the overall time needed to process a stored procedure. This can be accomplished by using the SET NOCOUNT ON command. Add it to the start of the above example, and when executed, notice that the rows affected message is suppressed. To reactivate the rows affected, use SET NOCOUNT OFF. This tip and more detected by Total SQL Analyzer PRO
|
|
|
Contact Us
l Web questions: Webmaster
l Copyright
© 2008 FMS, Inc. Celebrating 22 Years of Software Excellence |