Which of the following isolation levels is most likely to acquire a table level lock during an index scan?
-
Read Stability
-
Cursor Stability
-
Repeatable Read
-
Uncommitted Read
C
Correct answer
Explanation
Repeatable Read (RR) isolation level is designed to prevent phantom reads, which during an index scan requires acquiring a table-level lock to prevent other transactions from inserting or modifying rows that would affect the scan results. Read Stability (RS) and Cursor Stability (CS) use less restrictive locking at the row or page level. Uncommitted Read (UR) acquires minimal locks. The table-level lock in RR ensures that the set of rows matching a query remains consistent throughout the transaction.