Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Find Query Execution Time in SQL server 2000

Author  Topic 

ranjeetsingh_6
Posting Yak Master

125 Posts

Posted - 2006-09-05 : 05:28:18
Hi
How i will know execution time of my query.



Ranjeet Kumar Singh

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-09-05 : 05:33:20
Add SET STATISTICS TIME ON before the query and run the batch.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-09-05 : 05:38:55
It is also good practice to add

DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE

before the query, to ensure you are running the query from scratch and not from cache.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

ranjeetsingh_6
Posting Yak Master

125 Posts

Posted - 2006-09-05 : 05:52:13
Hi
i use this but not find how much time spend in execution
i use this as

SET STATISTICS TIME ON

select * from Vechiletrack


(--This is my query and i want its execution time )

Ranjeet Kumar Singh
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-09-05 : 05:57:44
Check the messages tab for:

SQL Server Execution Times

Also, you may find that it read Elapsed time as 0 ms for a lightweight query.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page
   

- Advertisement -