Neoview SQL Reference Manual (R2.5)

For related information about transactions, see “Transaction Isolation Levels” (page 32).
READ UNCOMMITTED
This option enables you to access locked data. READ UNCOMMITTED is not available for DML
statements that modify the database. It is available only for a SELECT statement.
READ UNCOMMITTED provides the lowest level of data consistency. A SELECT statement
executing with this access option is allowed to:
Read data modified by a concurrent process (sometimes referred to as dirty reads)
Read different committed values for the same item at different times or find that the item
no longer exists (sometimes referred to as nonrepeatable reads)
Read different sets of committed values satisfying the same predicate at different times
(sometimes referred to as phantoms)
READ COMMITTED
This option allows you to access only committed data.
The implementation requires that a lock can be acquired on the data requested by the DML
statement—but does not actually lock the data, thereby reducing lock request conflicts. If a lock
cannot be granted (implying that the row contains uncommitted data), the DML statement request
waits until the lock in place is released.
READ COMMITTED provides the next higher level of data consistency (compared to READ
UNCOMMITTED). A statement executing with this access option does not allow dirty reads,
but both nonrepeatable reads and phantoms are possible.
READ COMMITTED provides sufficient consistency for any process that does not require a
repeatable read capability.
READ COMMITTED is the default isolation level.
SERIALIZABLE or REPEATABLE READ
This option locks all data accessed through the DML statement and holds the locks on data in
tables until the end of any containing transaction.
SERIALIZABLE (or REPEATABLE READ) provides the highest level of data consistency. A
statement executing with this access option does not allow dirty reads, nonrepeatable reads, or
phantoms.
SKIP CONFLICT
This option allows transactions to skip rows locked in a conflicting mode by another transaction.
SKIP CONFLICT is not supported at the transaction level. It can only be specified at the table or
statement level.
Database Integrity and Locking
To protect the integrity of the database, Neoview SQL provides locks on data. For example,
Neoview SQL locks a row when an executing process accesses a row to modify it. The lock
ensures that no other process simultaneously modifies the same row.
Default locking normally protects data but reduces concurrency. If your application has problems
with lock contention, you might want to use options that control the characteristics of locks.
Locks have these characteristics:
“Lock Duration” (short or long)
“Lock Granularity” (table lock, subset of rows, or single row)
26 Introduction