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 2008 Forums
 Transact-SQL (2008)
 Select and Update rows at the same time

Author  Topic 

sainathb
Starting Member

3 Posts

Posted - 2012-04-30 : 03:33:20
Scenario:
One stored procedure will always fetch records from table1 and another stored procedure need to updates the same record from same table.

Solution:
Currently i am using with(rowlock) when updating records. which is working fine.

Question:
Now as users are going to increase in thousands, will it effect in updating records in table1. or is there any chance of deadlocks?


Thanks
Sai

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-04-30 : 10:09:32
use READ COMMITED SNAPSHOT isolation level so that it improves read concurrency by applying row versioning concept

http://visakhm.blogspot.com/2010/02/avoiding-deadlocks-using-new.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -