Column-Oriented Storage — From Fact Table to Aggregates

Column-Oriented Storage — From Fact Table to Aggregates A data-flow diagram generated by Archify. 01 / Source Table 02 / Column Layout 03 / Compression 04 / Execution Fact Table · billions of rows, wide table · 01 / Source Table · star schema Fact Table billions of rows, wide table star schema SQL Query · 3 of 100 columns · 02 / Column Layout · rarely SELECT * SQL Query 3 of 100 columns rarely SELECT * Column Blocks · one column per block · 02 / Column Layout · sorted by date_key Column Blocks one column per block sorted by date_key Bitmap + RLE · one bitmap per value · 03 / Compression · sparse bits counted Bitmap + RLE one bitmap per value sparse bits counted Vectorized Filter · equality + bitwise AND · 04 / Execution · SIMD batches Vectorized Filter equality + bitwise AND SIMD batches Aggregation · SUM by weekday, category · 04 / Execution · query result Aggregation SUM by weekday, category query result split into blocks by date range column layout column pruning: load 3 of 100 skip the rest encode low-cardinality columns bitmap per value bitwise AND of filter bitmaps no decode needed matching row indexes batch results GROUP BY + SUM aggregation spec Legend primary data async batch data store data flow