SET NOCOUNT ON – count in performance tip #17

Sometimes some small things which we ignore can impact more.

By default when you run any statement you will see in the message like no of records affected.
As shown in below figure.

Although, most of the time we do not require such information but still it is overhead.

So to stop such overhead which impact performance just use  SET NOCOUNT ON in your stored procedures.

For example
GO
SET NOCOUNT ON ;
 SELECT * FROM RequestMaster

GO

When you use SET NOCOUNT ON you will get a simple message
“ Command(s) completed successfully.”

Enjoy !!!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code