STOPWATCH is used to simply measure queries, especially long, complex ones. This is not a replacement for set statistics time on but it's a handy way to measure query behavior in a way that feels comfortable to C# developers, especially. STOPWATCH uses the system time to calculate elapsed durations.
Note: STOPWATCH uses SQL Server's
session_contextto persist the start time.
Example usage
EXEC STOPWATCH_START
SELECT * FROM USERS
EXEC STOPWATCH_READ