SQL Reference

Appendix I. Comparison of Isolation Levels

The following table summarizes information about isolation levels described in Isolation Level.
  UR CS RS RR
Can the application see uncommitted changes made by other application processes? Yes No No No
Can the application update uncommitted changes made by other application processes? No No No No
Can the re-execution of a statement be affected by other application processes? See phenomenon P3 (phantom) below. Yes Yes Yes No
Can "updated" rows be updated by other application processes? No No No No
Can "updated" rows be read by other application processes that are running at an isolation level other than UR? No No No No
Can "updated" rows be read by other application processes that are running at the UR isolation level? Yes Yes Yes Yes
Can "accessed" rows be updated by other application processes? See phenomenon P2 (nonrepeatable read) below. Yes Yes No No
Can "accessed" rows be read by other application processes? Yes Yes Yes Yes
Can "current" row be updated or deleted by other application processes? See phenomenon P1 (dirty-read) below. See Note below See Note below No No

Note:

  1. If the cursor is not updatable, with CS the current row may be updated or deleted by other application processes in some cases.

Examples of Phenomena:

P1
Dirty Read. Unit of work UW1 modifies a row. Unit of work UW2 reads that row before UW1 performs a COMMIT. If UW1 then performs a ROLLBACK, UW2 has read a nonexistent row.

P2
Nonrepeatable Read. Unit of work UW1 reads a row. Unit of work UW2 modifies that row and performs a COMMIT. If UW1 then re-reads the row, it might receive a modified value.

P3
Phantom. Unit of work UW1 reads the set of n rows that satisfies some search condition. Unit of work UW2 then INSERTs one or more rows that satisfies the search condition. If UW1 then repeats the initial read with the same search condition, it obtains the original rows plus the inserted rows.


[ Top of Page | Previous Page | Next Page ]