Skip to content
BENIBIX Learn

Columnar Storage

Also known as Column-Oriented Storage, Columnar Database, Column Store

A table kept one column at a time. A report reads just the columns it needs.

Think of it like

It is like a class list sorted by subject. All the math marks sit together, so adding them up is quick.

Example

A sales table has 50 columns. A query for total sales by month reads just the date and amount columns, a tiny part of the file.

Why it matters

It is why warehouses can scan billions of rows in seconds. Less data read means faster and cheaper queries.

Definition

Columnar storage keeps each column of a table together on disk. A row store keeps each whole row together instead. A report that needs two columns out of fifty reads only those two. Values in one column look alike, so they also squeeze down well. This makes big scans fast, but writing one row at a time is slow.
Same table, two layouts. A sum of totals reads one block in the column layout.

Common mistake

Using it for an app that writes one row at a time. Each small write has to touch every column.

Key takeaways

  1. 1
    Columns together. Each column is stored on its own.
  2. 2
    Read less. Skip the columns a query does not need.
  3. 3
    Squeezes well. Like values pack down small.

Compare