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.
| Author |
Topic |
|
sbt1
Yak Posting Veteran
89 Posts |
Posted - 2004-07-01 : 14:09:22
|
| Can I run a query, and have the query return the amount of time it takes to execute it, instead of (or in addition to would be ok) the actual data requested? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-07-01 : 16:31:21
|
| DECLARE @StartTime datetimeSET @StartTime = GETDATE()-- query goes hereSELECT DATEDIFF(ms, @StartTime, GETDATE())Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-07-01 : 16:33:28
|
| Remember..that's "wall time" (do they still say that)Has some meaning, but doesn't tell the whole picture though...Brett8-) |
 |
|
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2004-07-01 : 16:43:41
|
| Its just another Brick.JimUsers <> Logic |
 |
|
|
kselvia
Aged Yak Warrior
526 Posts |
Posted - 2004-07-01 : 16:56:37
|
| You can also runset statistics time onand SQL will return the time it took to compile and execute queries |
 |
|
|
|
|
|