What Is Phantom Read in Database

A phantom read occurs when, in the course of a transaction, new rows are added or removed by another transaction to the records being read. This can occur when range locks are not acquired on performing a SELECT … WHERE operation.

What is Phantom read in SQL Server?

Phantom Reads: Occurs when, during a transaction, new rows are added (or deleted) by another transaction to the records being read. … New rows can be added by other transactions, so you end up getting different number of rows by the same query in current transaction.

What are phantom reads in mysql?

The so-called phantom problem occurs within a transaction when the same query produces different sets of rows at different times. For example, if a SELECT is executed twice, but returns a row the second time that was not returned the first time, the row is a “phantom” row.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest