This blog is useful to all my friends who are working on the .Net Technology and wants to enhance their skills as well their problem solving ability.

Thursday, September 28, 2017

Avoid "print" statement from Sql Store procedure, It impacts the performance

DECLARE @date DATETIME2

DECLARE @count INT

SET @count = 1

SET @date = SYSUTCDATETIME()

WHILE @count < 1000000





BEGIN


--RAISERROR ('%d',0,1, @count) WITH NOWAIT


--PRINT @count

SET @count = @count + 1




END


SELECT DATEDIFF(MICROSECOND, @date, SYSUTCDATETIME()) / 1000000.