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 |
|
Prabu.Ramaiah
Starting Member
15 Posts |
Posted - 2009-07-07 : 00:50:30
|
| I have created one stored proc. How to find the execution time in case the time in Sec or M.Sec |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-07-07 : 01:53:56
|
| declare @date datetimeset @date=getdate()exec procedureselect datediff(second,@date,getdate())MadhivananFailing to plan is Planning to fail |
 |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-07-07 : 03:41:47
|
| Hisys.dm_exec_query_stats - Returns performance statistics for cached query plans. This contains one row per query plan so if a stored procedure or batch contains two SELECT statements you may get two rows here.... -------------------------Your time is a valuable resource. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-07-07 : 05:06:43
|
quote: Originally posted by rajdaksha Hisys.dm_exec_query_stats - Returns performance statistics for cached query plans. This contains one row per query plan so if a stored procedure or batch contains two SELECT statements you may get two rows here.... -------------------------Your time is a valuable resource.
Provided OP uses SQL Server 2005 (or more) versionMadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-07-08 : 12:02:10
|
quote: Originally posted by Prabu.Ramaiah I have created one stored proc. How to find the execution time in case the time in Sec or M.Sec
you can also get this by running profiler and looking for sp started and sp completed counter values |
 |
|
|
|
|
|