0 How to find the Query Execution Time


One method is to save the time before and after the query and to calculate the difference, something like this:

DECLARE @start_time DATETIME, @end_time DATETIME
SET @start_time = CURRENT_TIMESTAMP

-- query goes here

SET @end_time = CURRENT_TIMESTAMP
SELECT DATEDIFF(ms, @start_time, @end_time)


0 comments:

 

Dot Net - Pros & Cons Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates