Storage, Execution & Recovery Internals

Row, Column, and Compressed Storage

Row stores colocate attributes for one entity; column stores colocate values of one attribute across many entities. Encoding and compression exploit physical regularity, while late materialization delays row reconstruction so analytical operators carry only needed columns and compact position/selection vectors.
  • Row layout favors whole-record locality.
  • Column layout favors projection and scans.
  • Compression is part of execution economics.
  • Late materialization avoids premature width.
  • Updates complicate columnar locality.
  • Hybrid formats choose a unit of locality.
Same four orders, different locality
Physical-fit comparison
NeedRow-orientedColumn-oriented
One order, most fieldsFew localized readsGather from several segments
Sum amount for paid ordersReads unused columnsReads status + amount; encoded scan
Single-row updateLocalized in-place/version writeDelta/delete vector or segment rewrite
CompressionMixed values limit runsHomogeneous values expose dictionaries/runs/deltas