Solved

Phantom reads in transaction...

Posted on 2014-10-20
3
122 Views
Last Modified: 2014-10-20
I am reading the following definition for Phantom reads: Occur when you perform an update or delete on a set of rows when another transaction is performing an insert or delete that affects one or more rows in that same set of rows.

Question: Shouldn't this read has performed' instead of 'is performing'?

Thanks.
0
Comment
Question by:Mike Eghtebas
3 Comments
 
LVL 22

Accepted Solution

by:
Steve Wales earned 400 total points
ID: 40392312
I would say not.

"Is performing" indicates that another transaction has an insert or delete in process while you're trying to do your read.

That means that the insert or delete may have happened, but since a commit or rollback hasn't been processed at that time, that the transaction is still in flight, so is still in the process of being performed from a database perspective.   It may have been done already, but since it hasn't been committed yet as far as the database in concerned, it's not a permanent fixture in the database yet.

"Has performed" from a database perspective would mean that it had been committed to the database.
0
 
LVL 52

Assisted Solution

by:Julian Hansen
Julian Hansen earned 100 total points
ID: 40392323
I think what they are saying is that this occurs while another query is changing the data. Two select queries run at the same time while another is modifying the database. Select Query 2 yields different results from Select Query 1 because while in progress an INSERT or UPDATE runs to alter the results for Select Query 2
0
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 40392346
Thank you.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now