HomeData ScienceColumnar vs Row Storage: Analytical Scan Cost

Columnar vs Row Storage: Analytical Scan Cost (2D)

Interactive 2D disk-layout simulator: pick a table's row count, column count and bytes-per-column, choose which columns a query selects, and watch a live-computed bytes-read comparison between row-oriented and column-oriented storage.

Data Science2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-ds-topic-30 ↗ Open standalone

This 2D counterpart builds the same table on a plain canvas grid — rows across, columns down — and drives every readout straight from the geometry you set: row count, column count, bytes per column, and which columns the query's SELECT list checks. Because the layout has no WHERE clause, the row-oriented store is forced to read every column of every row no matter what's selected (rows are laid out contiguously on disk), while the column-oriented store only ever opens the bytes belonging to the checked columns (each column is its own contiguous run). The block grid highlights exactly the bytes each layout actually reads and dims the rest, and a live bar chart plus a computed savings ratio (table columns ÷ selected columns) show, numerically, that narrowing the SELECT list widens columnar's advantage while selecting nearly all columns collapses it toward parity.

⚙ Under the hood

Run the same analytical query against a row-oriented and a column-oriented table layout in 3D and watch column pruning and predicate pushdown decide how many bytes actually get read off disk.

data engineeringcolumnar storageOLAPquery optimizationcompressiondata warehouse

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)