DB2 Version 4.1
Uncommitted Read

Uncommitted Read (UR) -- also known as "dirty read" or "read through locks" -- is one of the most useful features of DB2 V4.1.



Two ways to invoke UR:
Notes on using UR:
















NOTE: Contrary to popular belief (to coin a phrase) queries using UR do acquire locks, though not the kind that are likely to cause contention. First, they acquire a special "mass delete" lock in share (S) mode on the target table or tablespace; this is not the same as a normal share (S) lock on a table or tablespace. The special mass delete S lock prevents any other process from issuing a mass delete (a delete statement without a WHERE clause) while the query is running. Thus, it is possible to have contention between a UR query and a mass delete. Second, UR queries acquire IX locks on any tablespace they may happen to use in the temporary work file database. This lock prevents the work file tablespace from being dropped while the query is running; it is of no concern to the developer because the work file tablespaces are dropped, if at all, only during DB2 subsystem maintenance, and no queries would be running while such maintenance was in progress.




©Copyright 1996 Chuck Anesi all rights reserved