Created
February 27, 2019 09:37
-
-
Save theuntitled/0ed5fcb170334f1c9a78ead386027e7a to your computer and use it in GitHub Desktop.
Measures the elapsed time for a query in milliseconds.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @t1 DATETIME; | |
DECLARE @t2 DATETIME; | |
SET @t1 = GETDATE(); | |
-- Query to measure | |
SET @t2 = GETDATE(); | |
SELECT DATEDIFF(millisecond,@t1,@t2) AS elapsed_ms; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment