Mutability vs. immutability
In-place update vs. append-only + GC; buys reproducibility and cheap concurrency, pays in space and janitorial work.
Where you meet it: copy-on-write, event sourcing, table snapshots, time travel, crypto-shredding vs. hard delete.
What it is
A queue versus a log is two classic trade-offs at once: ordering versus parallelism, and mutability versus immutability. The log is the immutable choice: it only appends, and a cleanup process (retention) removes old data. It collects the benefits you would expect from immutability (reproducibility, many cheap concurrent readers) and pays the expected costs (space, and janitorial work: retention policy, compaction, offset management, and tiered storage, which moves old data to cheaper storage).
From Data Movement › Queue versus log
Encoding fuses values into blocks, so the layout decision made for read efficiency has produced a new granularity mismatch on the write side. This is the mismatch rule again, caused by your own optimization. This is why columnar systems do not update in place. It is not a preference. The cost structure forbids it, and these systems hand the problem to merge-on-read, delete vectors and copy-on-write (all explained in Mutation strategies: what happens when a value changes). Columnar layout does not merely coexist with immutability. It forces it. That is the handover to Mutation strategies: what happens when a value changes.
From Storage: Physical Organization › Row, column and PAX
Where it appears
In 14 mechanisms. Each says what the mechanism is about, then how this trade-off shows up there, in its own words.
- Physical Substrate & Performance Laws
Why do trade-offs exist at all?
Because of this granularity mismatch (Cause 2), flash has no in-place update.
Read it inDisk and flash
- Data Movement
How do records cross between two systems that have independent rates, independent availability and independent lifetimes, and what are you willing to lose when the assumption underneath the crossing breaks?
This is two classic trade-offs at once: ordering versus parallelism, and mutability versus immutability.
- Storage: Physical Organization
What should sit next to what, given that I must decide at write time and find out at read time?
The trick, named precisely: CoW converts an atomicity problem of any size into an atomicity problem of one pointer.
Read it inLayout models: row, column and PAXMutation strategies: what happens when a value changesWhat physical organization forbids
- Core Data Structures
How do we choose a data structure when the real cost is set by the hardware, not by Big-O?
The whole structure's contention collapses to a single word.
Read it inImmutable and persistent data structuresPerfect and minimal perfect hashingCuckoo, XOR and ribbon filters
- Encoding, Serialization & Compression
What do we turn our values into when we turn them into bytes, and what does that choice cost?
So compaction improves the compression ratio and the skipping, not only the file count.
Read it inRow order dominates the codecWhat lightweight encoding forbids
- Indexing
When does a separate "where is it?" structure pay for itself, and what does it cost to keep it true?
MVCC forces indexes either to duplicate per version or to add indirection.
Read it inIndexes under MVCC, and maintenance
- Transactions & Concurrency Control
What happens when many users change the same data at the same time, and how do we keep the result correct?
Where you put the data decides which of commit and abort is the expensive one.
Read it inBegin, commit and abortA frame for placing any mechanism
- Query Planning & Optimization
How does a system choose a plan for a question when the facts that decide the best plan are unknown until the plan has run?
Skipping is what indexing becomes on an immutable substrate.
Read it inFile, row-group and page skipping
- Caching
What happens when we deliberately keep a second copy of data that no protocol forces to be correct?
Content-addressed keys over an immutable substrate convert a coherence problem into a capacity problem.
Read it inThe coherence boundary and immutable keysNine prohibitions and their escapes
- Fault Tolerance & Delivery Semantics
What is the cheapest thing that can be safely done twice?
Immutable storage gets undo as a pointer move; mutable storage buys it on the write path.
Read it inRollback and undo: where reversing stops
- Time & Temporal Semantics
When am I allowed to act on data that may still be incomplete, and what do I owe the reader if I was wrong?
Both break the immutability that the design was selling.
Read it inBitemporal modeling and time travelWhich clock keys the partition
- Streaming
What does it cost to remember, when the input never ends?
Streaming output is a changelog by default.
Read it inChangelogs and table-stream duality
- Data Modeling
What does one row mean, who is allowed to change that answer, and what breaks downstream when they do?
That purpose is conditional on in-place update.
Read it inNormalization and denormalizationFact table typesEvent sourcing and activity schema
- Metadata, Catalog & Lineage
What can a system prove about its data without reading the data, and how does it know that proof is still true?
Immutable identifiers make caches trivially correct.
Read it inThe schema registry as metadata
Related
Made on the same pages most often.