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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Estimate Stored Procedure Duration

Author  Topic 

infodemers
Posting Yak Master

183 Posts

Posted - 2012-03-01 : 12:50:31
Hi,

I have a stored procedure of about 1000 lines of code!
I wish to estimate how long it is going to take to return the results. Once I know how long it takes, I can figure a window at night to schedule it.

Any idea?
Thanks!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-03-01 : 13:09:34
Take a backup of the database and restore it to a test machine. Run it on the restored database. There you go.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

infodemers
Posting Yak Master

183 Posts

Posted - 2012-03-01 : 13:18:29
Thanks for the suggestion Tara,

But I do not want to wait until the end to find out how long it takes.
I wish their could be some way to find outm other than this.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-03-01 : 13:26:15
There is no way to estimate it without running it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -