• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why does phantom reads are considered as Error or a Problem

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

A phantom read occurs when, in the course of a transaction, two identical queries are executed, and the collection of rows returned by the second query is different from the first. This can occur when range locks are not acquired on performing a SELECT.


How can a Phantom read be a problem ever ?

In my view when data is chnaged , the second query will definately return new things .

Can anybody let me know this , why this is said to be a problem ??
 
Jan Cumps
Bartender
Posts: 2602
13
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From our forum:
http://www.coderanch.com/t/304290/JDBC/java/Phantom-Read
Whether a phantom read is a problem or not depends solely on your application.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great , thank you very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic