I read such articles: http://www.codinghorror.com/blog/archives/001166.html http://www.databasejournal.com/features/mssql/article.php/3566746/Controlling-Transactions-and-Locks- Part-5-SQL-2005-Snapshots.htm
And from what I understand, SQL Server has a very pessimistic locking strategy. And to improve performance, I have to change the Read Committed Snapshot lock.
But I can’t find where to do this. Where can I change my blocking strategy?
, ALTER.
:
ALTER DATABASE YourDatabaseName SET READ_COMMITTED_SNAPSHOT ON;
, : .
EDIT: , .
SNAPSHOT tempdb .
. SET ISOLATION LEVEL .NET.
, SQL Server , (.. ), , WITH (ROWLOCK) .
UPDATE YourTable (WITH ROWLOCK) SET Col2 = 3 WHERE Col1 = 'test'
, ROWLOCK , , tempdb, tempdb.
,
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
, , , . READ UNCOMMITTED , .