SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 limiting execution time for a select command
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

FarzinSh
Starting Member

Iran
7 Posts

Posted - 08/24/2013 :  06:00:35  Show Profile  Reply with Quote
Can we set a limit on the execution time of a single select or insert command?I am using c# and .net entity framework to run insert and select commands simultaneously on a single table.The problem we are currently facing with is that sometimes when many inserts and selects request execution at once, sql server command execution time goes up drastically resulting in a poor performance. To avoid this I thought we could limit the execution time for each command so as not to let them keep sql server more than they really should. Any ideas?

MuMu88
Aged Yak Warrior

547 Posts

Posted - 08/24/2013 :  11:19:02  Show Profile  Reply with Quote
You can implement timeout as described here:
http://stackoverflow.com/questions/10143980/implementing-a-timeout-in-c-sharp
Go to Top of Page

FarzinSh
Starting Member

Iran
7 Posts

Posted - 08/25/2013 :  01:13:41  Show Profile  Reply with Quote
thx for your respond though it didnt make sense since they cant stop and cancel the executing command in case timer counts more than the set time.They are just throwing an exception.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000