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)
 how to increase stored procedure run time

Author  Topic 

chedderslam
Posting Yak Master

223 Posts

Posted - 2008-06-24 : 10:53:10
I am trying to test the connection pooling of my app and need to artificially increase the execution of a stored procedure to 10-15 seconds. There aren't any big tables in my sample data to select on. What would be the easiest way to make a stored procedure fun for a few seconds?

Thanks.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-06-24 : 10:57:00
quote:
What would be the easiest way to make a stored procedure fun for a few seconds

in ascending order of easiest to hardest
1. run it on a faster machine
2. optimize your query in the stored procedure


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

chedderslam
Posting Yak Master

223 Posts

Posted - 2008-06-24 : 11:00:09
Looking over my post, I wasn't clear in my question. I actually want the stored procedure to run slower(take longer to run). I need my app to create more than one connection to the db, so I need to be able to start a query, then start another query while the first is still running.

Thanks.
Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2008-06-24 : 11:00:42
WAITFOR DELAY '00:00:15'


Jim
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-06-24 : 11:01:42
Read about WAITFOR DELAY in sl server help file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-06-24 : 11:02:17


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

chedderslam
Posting Yak Master

223 Posts

Posted - 2008-06-24 : 11:06:38
That's what I needed. Thank you.
Go to Top of Page
   

- Advertisement -