Skip to content

Column-oriented Storage

Column-Oriented Storage

A.k.a. columnar representation. Each attribute of a relation is stored separately.

Benefits

  • Reduced IO if a limited number of attributes are accessed
  • Better CPU cache performance and compression
  • Good for vector processing

Costs

  • Tuple reconstruction from the columnar representation
  • Tuple deletion and update
  • Decompression

We typically prefer row-oriented representation for transaction processing. Some databases support both styles though, and they're called hybrid row/column stores.

When stored in memory, there's an indirection table that links each column's head to a pointer.