| | |
MSSQL Concurrency
Please support our MS SQL advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Nov 2008
Posts: 4
Reputation:
Solved Threads: 0
I have several questions:
Here is the context: The ASP.NET application I'm building - a web service in essence - will be connecting to MSSQL to log requests to a table. These are basic INSERT commands.
During high-volume hours, do I risk race conditions? How does MSSQL handle sequential INSERT queries? What about when there are multiple users? What is the cleanest way to connect the database and handle each query fast, so that no information is lost?
As a side note, the database will be handling other SELECT, UPDATE and DELETE query requests at the same time, but not nearly as frequently. HOWEVER, SELECT operations may involve between 100-2000 records and there may be multiple concurrent requests. How do I minimize concurrency problems?
Feel free to suggest reference material. Primarily I need some basic theory on how MSSQL2005 Express handles queries (its limits), and whether there is anything specific to look for. In other words, I know that I will run into concurrency problems, I just don't know which ones I should spend my time preempting.
Thanks in advance
Here is the context: The ASP.NET application I'm building - a web service in essence - will be connecting to MSSQL to log requests to a table. These are basic INSERT commands.
During high-volume hours, do I risk race conditions? How does MSSQL handle sequential INSERT queries? What about when there are multiple users? What is the cleanest way to connect the database and handle each query fast, so that no information is lost?
As a side note, the database will be handling other SELECT, UPDATE and DELETE query requests at the same time, but not nearly as frequently. HOWEVER, SELECT operations may involve between 100-2000 records and there may be multiple concurrent requests. How do I minimize concurrency problems?
Feel free to suggest reference material. Primarily I need some basic theory on how MSSQL2005 Express handles queries (its limits), and whether there is anything specific to look for. In other words, I know that I will run into concurrency problems, I just don't know which ones I should spend my time preempting.
Thanks in advance
•
•
Join Date: Aug 2008
Posts: 1,162
Reputation:
Solved Threads: 138
i think you are seeming to be worried about the load, vs the concurrency
i would suggest using stored procedures with transactions
there is no problem with inserts, as long as they won't bust unique constraints or allow a user to join against them, when data isn't finished being populated
selects may involve 100-2000 records, for multiple clients, as long as the server can handle the load, then its not really a concurrency issue
here's an article that might be of interest
http://blog.sqlauthority.com/2007/04...-and-examples/
i would suggest using stored procedures with transactions
there is no problem with inserts, as long as they won't bust unique constraints or allow a user to join against them, when data isn't finished being populated
selects may involve 100-2000 records, for multiple clients, as long as the server can handle the load, then its not really a concurrency issue
here's an article that might be of interest
http://blog.sqlauthority.com/2007/04...-and-examples/
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
•
•
Join Date: Aug 2008
Posts: 1,162
Reputation:
Solved Threads: 138
concurrency issues won't only be the result of updates, but from what you described what you were worried about, you only described about the amount of load on the system
how many users do you anticipate using your system at once? and is it a shared system, both web and db server?
how many users do you anticipate using your system at once? and is it a shared system, both web and db server?
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
•
•
Join Date: Aug 2008
Posts: 1,162
Reputation:
Solved Threads: 138
i would suggest, not saying this is for sure the answer, using transactions with READ COMMITTED or REPEATABLE READ
this way while changing or selecting data, you ensure that it can't be modified while selecting or read until don't processing
http://msdn.microsoft.com/en-us/library/ms173763.aspx
this way while changing or selecting data, you ensure that it can't be modified while selecting or read until don't processing
http://msdn.microsoft.com/en-us/library/ms173763.aspx
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
![]() |
Other Threads in the MS SQL Forum
- Previous Thread: SQL homework problem
- Next Thread: Multiple Joins on single table
| Thread Tools | Search this Thread |
Tag cloud for MS SQL
"last autogrowth business connectingtodatabaseinuse count cursor data database dateadd datepart day" dbsize deadlock delete_trigger exploit getdate hack highperformancecomputing hpc hpcserver2008 ibm iis limit loop maximum microsoft ms mssql multiple multithreading news number password permission position query reporting result security server services sets single source sql sql-injection sqlserver sqlserver2005 subtype supercomputing supertype tables uniqueid update view weekday






