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.
| Need | Row-oriented | Column-oriented |
|---|---|---|
| One order, most fields | Few localized reads | Gather from several segments |
| Sum amount for paid orders | Reads unused columns | Reads status + amount; encoded scan |
| Single-row update | Localized in-place/version write | Delta/delete vector or segment rewrite |
| Compression | Mixed values limit runs | Homogeneous values expose dictionaries/runs/deltas |