Thread: Phantom Read
View Single Post

   
  #2 (permalink)  
Old 04-08-2008, 07:56 AM
Robert Klemme
 
Posts: n/a
Default Re: Phantom Read

dd wrote:
> I am a bit confused by exactly what constitute a Phantom Read. Does
> it include ONLY the case where ADDITIONAL rows have been added during
> 2 queries. Then what about rows DELETED between 2 queries? I have
> this concern because many textbooks do define Phantom read as
> addition of rows but never mention anything about removed rows.


AFAIK "Phantom reads" just refer to rows added after an earlier read. If
you have deleted rows it's a nonrepeatable read. See chapter "Data
Concurrency and Consistency" of the Concepts document.

> If Oracle or any database says its Serializable isolation level does
> prevent Phantom Read, can I assume that it means no rows inserted nor
> DELETED between 2 queries?


Yes, because Serializable prevents phantom reads *and* nonrepeatable
reads.

Kind regards

robert

Reply With Quote