Click here to Skip to main content
15,884,648 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

What will happen if 1000 users trying to execute the stored procedure at a time?

How it will work? Single thread or multi thread or FIFO manner?
Posted
Updated 19-May-11 23:01pm
v2

1 solution

There is no hard and fast rule for this. This depends on many criteria like what is database (i.e Oracle, DB2,Sql server etc ) and what is the operation performed inside the SP(insert/update or just a select). In case of select opration inside SP the SP may execute over multiple threads(this is where data base comes into picture) where as insert/update statements require exclusive lock on tables therefore this will always be FIFO.
 
Share this answer
 
Comments
OriginalGriff 20-May-11 4:14am    
Just about perfect! Beat me too it - 5!
[no name] 20-May-11 4:19am    
Nice Call. My 5 too.
Toniyo Jackson 20-May-11 4:34am    
Thanks CS. So, Is there any differences in performance when one user executing and multiple user executing the SP at a time? Here am using only SELECT statements.
CS2011 20-May-11 4:41am    
Yes there will be some performance difference for sure but how much will again depends on the data base/Hardware of the server and number of result returned by your select statement (Inside the SP)
Toniyo Jackson 20-May-11 4:47am    
Okay. Thanks CS. Then, how to solve the problem? I want same execution time if multiple users excuting also. Any solution?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900