Could some one please help me understand when to use SNAPSHOT isolation level over READ COMMITTED SNAPSHOT in SQL Server?
I understand that in most cases READ COMMITTED SNAPSHOT works, but not sure when go for SNAPSHOT isolation.
Thanks
The Read Committed Snapshot Isolation Level in SQL Server provides the statement-level read consistency whereas the Snapshot Isolation Level provides the transaction-level read consistency.
READ COMMITTED is the default isolation level for SQL Server. It prevents dirty reads by specifying that statements cannot read data values that have been modified but not yet committed by other transactions.
Repeatable read is a higher isolation level, that in addition to the guarantees of the read committed level, it also guarantees that any data read cannot change, if the transaction reads the same data again, it will find the previously read data in place, unchanged, and available to read.
tl;dr: Repeatable read isolation on MyRocks is effectively Snapshot isolation (unless it's affecting an unique index). This is the default isolation level for InnoDB. Consistent reads within the same transaction read the snapshot established by the first read.
READ COMMITTED SNAPSHOT
does optimistic reads and pessimistic writes. In contrast, SNAPSHOT
does optimistic reads and optimistic writes.
Microsoft recommends READ COMMITTED SNAPSHOT
for most apps that need row versioning.
Read this excellent Microsoft article: Choosing Row Versioning-based Isolation Levels. It explains the benefits and costs of both isolation levels.
And here's a more thorough one: http://msdn.microsoft.com/en-us/library/ms345124(SQL.90).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With