encyclopegia.org

Halloween Problem

In computing, the Halloween Problem refers to a phenomenon in databases in which an update operation causes a change in the physical location of a row, potentially allowing the row to be visited again later in the same update operation.[src] This could even cause an infinite loop in some cases where updates continually place the updated record ahead of the scan performing the update operation.[src] The potential for this database error was first discovered by Don Chamberlin, Pat Selinger, and Morton Astrahan in the mid-1970s, on Halloween day, while working on query optimization.[src] They wrote a SQL query supposed to give a ten percent raise to every employee who earned less than $25,000.[src] This query would run successfully, with no errors, but when finished all the employees in the database earned at least $25,000, because it kept giving them a raise until they reached that level.[src] The expectation was that the query would iterate over each of the employee records with a salary less than $25,000 precisely once.[src] In fact, because even updated records were visible to the query execution engine and so continued to match the query's criteria, salary records were matching multiple times and each time being given a 10% raise until they were all greater than $25,000.…[src]

In computing, the Halloween Problem refers to a phenomenon in databases in which an update operation causes a change in the physical location of a row, potentially allowing the row to be visited again later in the same update operation.[src] This could even cause an infinite loop in some cases where updates continually place the updated record ahead of the scan performing the update operation.[src] The potential for this database error was first discovered by Don Chamberlin, Pat Selinger, and Morton Astrahan in the mid-1970s, on Halloween day, while working on query optimization.[src] They wrote a SQL query supposed to give a ten percent raise to every employee who earned less than $25,000.[src] This query would run successfully, with no errors, but when finished all the employees in the database earned at least $25,000, because it kept giving them a raise until they reached that level.[src] The expectation was that the query would iterate over each of the employee records with a salary less than $25,000 precisely once.[src] In fact, because even updated records were visible to the query execution engine and so continued to match the query's criteria, salary records were matching multiple times and each time being given a 10% raise until they were all greater than $25,000.[src] Contrary to what some believe, the name is not descriptive of the nature of the problem but rather was given due to the day it was discovered on.[src] As recounted by Don Chamberlin: Pat and Morton discovered this problem on Halloween...[src] I remember they came into my office and said, "Chamberlin, look at this.[src] We have to make sure that when the optimizer is making a plan for processing an update, it doesn't use an index that is based on the field that is being updated.[src] How are we going to do that?" It happened to be on a Friday, and we said, "Listen, we are not going to be able to solve this problem this afternoon.[src] Let's just give it a name.[src] We'll call it the Halloween Problem and we'll work on it next week." And it turns out it has been called that ever since.[src]

21 sentences · 21 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Halloween Problem." encyclopegia.org, 2026, https://encyclopegia.org/wiki/halloween-problem. Accessed 30 November 2026.

Chicago

"Halloween Problem." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/halloween-problem.

APA

encyclopegia.org. (2026). Halloween Problem. Retrieved November 30, 2026, from https://encyclopegia.org/wiki/halloween-problem

Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

promise problem

stub · references available

two emperor problem

stub · references available

Cyprus problem

stub · references available

symbol grounding problem

stub · references available

The Three-Body Problem

stub · references available

many-body problem

stub · references available

Post correspondence problem

stub · references available

Hilbert's thirteenth problem

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1365707918 · 0.5 · snapshot enwiki-001365707918

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.