Solved

Phantom reads in transaction...

Posted on 2014-10-20
3
123 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 54

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

770 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