Why architecture matters here

Columnar architecture matters because analytical queries touch few columns of many rows. Row stores read entire rows to get a few columns; columnar reads only what's needed. 10-100x less I/O for typical analytics.

Cost is proportional to storage; columnar compresses better than row (adjacent values similar).

Reliability of query performance improves with vectorized execution + SIMD; predictable throughput.

Advertisement

The architecture: every piece explained

Walk the diagram top to bottom.

Analytical query. SELECT with aggregations, GROUP BY, scans over many rows.

Columnar storage. One file per column. Rows reconstructed by joining columns.

Vectorized engine. Operate on batches (1024, 4096 rows) not one at a time. Cache-friendly + SIMD-friendly.

Compression per column. Run-length encoding for sorted; dictionary for low cardinality; delta for time series.

Predicate pushdown. Block statistics (min/max, nulls) let query skip blocks that can't match.

SIMD in kernels. AVX-512 processes 16 int32s per instruction. Aggregation loops SIMD-vectorized.

Materialized views. Pre-aggregated results for common queries.

Parallelism. Shard by key; thread by column block.

OLAP fit. Aggregation + wide-table + scan-heavy workloads.

Update pain. Updating a row means updating many column files. Most columnar DBs are append-only or MVCC.

Analytical queryaggregations + scansColumnar storageone file per columnVectorized enginebatch executionCompression per columnrun-length, dictionary, deltaPredicate pushdownskip block statisticsSIMD in kernelsthroughputMaterialized viewscube-likeParallelismshard + threadOLAP fitwide tables, aggregationsUpdate painimmutable or append-heavyClickHouse, DuckDB, Snowflake, BigQuery, Redshift, Vertica
Columnar database architecture: columnar storage + vectorized engine + compression + predicate pushdown + SIMD + parallelism; OLAP-focused.
Advertisement

End-to-end query flow

Trace a query. SELECT day, SUM(amount) FROM sales WHERE region='EU' GROUP BY day.

Query planner: scan region, day, amount columns only. Ignore other columns.

Predicate pushdown: block stats for region show which blocks contain 'EU'. Skip others.

Read region + day + amount for matching blocks. Batches of 4096 rows loaded into vectors.

Vectorized engine: SIMD filter for region == 'EU'; produce output vector of matching indices.

Aggregate: hash by day; SIMD-summed amount per group.

Result: few thousand rows in seconds even for TB source. Compare row store: entire rows scanned even for 3 columns of interest — 30x slower.

Update: insert new sales row appends to each column file. Delete marks row as tombstoned; compacted later.