How it works
These engines have served online transaction processing (OLTP): many small reads and writes by key, at low latency. Online analytical processing (OLAP) is the opposite: fewer queries, each scanning millions of rows to aggregate a few columns. “Revenue per region last quarter” may touch 3 columns out of 60, but nearly every row in the quarter.
A row store keeps each row’s values together, so that scan drags every column through memory. A column store keeps each column in its own segments and reads only what the query names. As an example, 1 billion rows at 500 bytes each means a row store reads about 500 GB, while a column store reading 3 columns of 8 bytes reads 24 GB. Compression widens the gap, because values in one column look alike. A region column with 30 distinct values needs under one byte per row with dictionary codes, and far less if the table is sorted by region. Snowflake, BigQuery, ClickHouse, and the Parquet file format all store data by column.
The cost falls on writes and single-row reads. One row is spread across many column files, so inserting or fetching a whole row is slow, and column stores usually buffer new rows and merge them in batches.
A separate warehouse adds a pipeline to run, data minutes or hours behind, and another bill. Start by pointing reports at a read replica. A warehouse earns its keep when analytics needs data from several systems, long history that production should not carry, or scans too slow for a row-store replica.
Your 200 GB Postgres database has one read replica, where finance’s monthly report takes 40 minutes and bothers nobody. Now the product team wants a daily dashboard that joins orders with billing-provider exports and ad spend over five years of history. Do you add a warehouse?
The monthly report alone would not justify one, but the new need does: several sources, long history, and a daily scan. Start small by loading the few tables the dashboard needs once a day, into a warehouse or into Parquet files a query engine can read. Keep the replica for reports that need fresher data. The cost is a pipeline someone owns and data up to a day old, which the dashboard should state plainly.
Use this as a guide for self review; written answers are not graded.Keep in mind
- Column storage makes a scan cheap when a query reads few columns out of many.
- Compression works well because values in one column look alike.
- Try a read replica first; add a warehouse when analytics outgrows it.