Solved

Phantom reads in transaction...

Posted on 2014-10-20
3
124 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 55

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 34

Author Comment

by:Mike Eghtebas
ID: 40392346
Thank you.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add a step to a system backup job 6 19
SQL USE DATABASE VARIABLE 5 30
What is the best way to use power bi and ssrs 3 27
Run Stored Procedure uisng ADO 5 21
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

830 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