Solved

Phantom reads in transaction...

Posted on 2014-10-20
3
116 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 51

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
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
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

707 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

10 Experts available now in Live!

Get 1:1 Help Now