DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: phantom read

  1. #1
    Join Date
    Feb 2001
    Posts
    103
    Can anybody tell me what is a Phantom Read?
    When the going gets tough, the tough gets going

  2. #2
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    A phantom read is not possible in Oracle.

    This is a situation that can occur at lower isolation levels, which Oracle actually does not support.

    First, a different term, which most people have heard of is a dirty read. User A is in the midst of changing a given record and User B is allowed to read those changes (that 'dirty' record) before they are committed. Well, what if User A does a rollback? Then User B read altered data that was never committed. Take this to the next step. What if User A is inserting a record and User B is allowed to read that record? Now what if User A does a rollback? User B has read a record that was never 'really' inserted into the database because it was never committed. They have performed a 'phantom' read.

    - Chris

  3. #3
    Join Date
    Oct 2000
    Posts
    123
    Is it something like phantom reference of garbage collection in JAVA?

    Take care

  4. #4
    Join Date
    Jul 2000
    Posts
    296
    A phantom read occurs if a transaction re-executes a query returning a set of rows that satisfies a search condition and finds that another committed transaction has inserted additional rows that satisfy the condition.
    A dirty read occurs if a transaction reads data that has been written by another transaction that has not been committed yet.

    Phantom reads are possible in Oracle, dirty reads not.

    You can change the isolation level of the transaction to prevent phantom reads.


  5. #5
    Join Date
    Mar 2001
    Posts
    2

    NOT like phantom reference

    No relationship, obviously, to Java phantom refrences (which are used to effectively delay garbage collection of objects which you MIGHT want to re-use later, but which can be recreated if unavailable).

    BTW - thanks for the excellent descriptions - phantom reads and dirty reads have been pretty muddled in my brain.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width