Over a million developers have joined DZone.
Platinum Partner

TSQL Performance Tuning

· Performance Zone

The Performance Zone is brought to you in partnership with AppDynamics.  See Gartner’s latest research on the application performance monitoring landscape and how APM suites are becoming more and more critical to the business.

Below is an example of the TSQL you can use to investigate your stored procedure's performance. Best to put this in a snippet if you're using VS 2012 or greater versions of SQL Management Studio I find.

SET NOCOUNT ON

DBCC FREEPROCCACHE

DBCC DROPCLEANBUFFERS

CHECKPOINT

GO

PRINT ' '

PRINT '-- START: ProcName --------------------------------------------------------------------------------------------------------------------------------'

PRINT ' '

SET STATISTICS IO ON

SET STATISTICS TIME ON

EXEC dbo.MyProcNameHere

SET STATISTICS TIME OFF

SET STATISTICS IO OFF

PRINT ' '

PRINT '-- END: ProcName --------------------------------------------------------------------------------------------------------------------------------'

PRINT ' '

GO

The Performance Zone is brought to you in partnership with AppDynamics.  See Gartner’s latest research on the application performance monitoring landscape and how APM suites are becoming more and more critical to the business.

Topics:

Published at DZone with permission of Merrick Chaffer , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}