📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

When would you use snapshot isolation or RCSI with EF Core on Azure SQL, and what does it cost?

Mid-Level Theory Intermediate

🎯 Key points

  • RCSI: per-statement consistency, on by default for new Azure SQL Database databases (verify in sys.databases)
  • Snapshot: per-transaction consistency
  • ALLOW_SNAPSHOT_ISOLATION ON required
  • Version store cost and a 14-byte versioning tag per modified row
  • Update conflict error 3960 needs retry

⏱ 30-second answer

New Azure SQL Database databases have READ_COMMITTED_SNAPSHOT (RCSI) on by default (on-premises SQL Server doesn't; check is_read_committed_snapshot_on in sys.databases for your database). With RCSI each statement reads a consistent committed version without blocking writers. For several statements to see the same version, use IsolationLevel.Snapshot (needs ALLOW_SNAPSHOT_ISOLATION ON). The cost is the row-version store (tempdb, or the persistent version store when accelerated database recovery is on, as it always is in Azure SQL Database), a 14-byte versioning tag added to modified rows, and update conflicts (error 3960) under snapshot that you must retry.

🔍 What the interviewer is checking

Checks understanding of isolation levels behind consistency claims.

↩ Usually asked after

More in Querying

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me