Here is a quick SQL statement that will report on CPU and elapsed time for specified stored procedures.
USE DatabaseName
GO
SET STATISTICS TIME ON
GO
PRINT '---------------- START SP 1 ------------------------'
EXEC stored_proc1
PRINT '---------------- END SP 1 --------------------------'
GO
PRINT '---------------- START SP 2 ------------------------'
EXEC stored_proc2
PRINT '---------------- END SP 2 --------------------------'
GO
SET STATISTICS TIME OFF
GO
No comments:
Post a Comment