this is specifically for SQLserver: I want to know if I have a transaction with isolation level SERIALIZABLE and another one with READ UNCOMMITTED how will they interact concurrently? will the second one be able to read uncommitted changes from the first one?
1 Answer
will the second one be able to read uncommitted changes from the first one?
Yes. SERIALIZABLE uses Table/Page/Row locks and READ UNCOMMITTED ignores all such locks. Also don't use READ UNCOMMITTED, see eg NOLOCK Is Bad And You Probably Shouldn’t Use It.
Read Transaction locking and row versioning guide for more info.
-
1Maybe you could explain, for people who dont know, why they shouldn't use READ UNCOMMITTED Jul 26 at 20:16
-
"READ UNCOMMITTED ignores all such locks" but not when modifying a table, and it does not ignore schema locks Jul 28 at 0:27
-