SQL Insights

Should You Skip Repeatable Read

Should you skip Repeatable Read for Snapshot Isolation in SQL Server? The answer depends on your specific workload. What does Repeatable Read do? It prevents a non-repeatable read from occurring. A non-repeatable read happens when a transaction retrieves the same row multiple times, and another transaction updates that row, resulting in a different value.

Repeatable Read works by holding locks for the duration of the transaction, which reduces concurrency (writers block reads). However, Snapshot uses row-versioning, which does not block readers but allows for the possibility of write conflicts and the need to retry a failure or let the end user try again. 

The bottom line is that I would at least consider using Snapshot if you are thinking about using Repeatable Read.