Quick Find: Search for:
Free Resources
from FMS
 

Demos

Email Newsletter

Technical Papers

Tips and Techniques

Links

Book Recommendations

View all FMS products for Microsoft AccessMicrosoft Access Resource Center

 

 

"Thank you! Thank you!
I just finished reading this
document, which was part of a link in the recent Buzz newsletter. I have printed it for others to read, especially those skeptical on the powers of Access and its capabilities.
" 
- Darren D.
 
  

 

Improve performance of Stored Procedures by using SET NOCOUNT ON

Provided by Steve Clark, Project Manager

In 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:

Use Pubs
Update authors
Set Contract = 1
WHERE State = 'KS'

When this query is executed, the messages pane displays:

(1 row(s) affected)

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

 

Return to the tips page.

Contact Us  l   Web questions: Webmaster   l   Copyright © 2008 FMS, Inc.

Celebrating 22 Years of Software Excellence