Scrivio Interview library
ConceptFoundations6 min read · updated 13 November 2026

Analytical data now lives in several kinds of systems: the transactional database, a cloud data warehouse, and real-time OLAP engines such as ClickHouse, Apache Druid or Apache Pinot that serve dashboards inside products.

What is each of the three built for, and which would you pick for an internal monthly finance report, a customer-facing dashboard refreshed every few seconds, and a lookup of one order by id?

An OLTP database serves many small reads and writes with transactions and row indexes, so the lookup of one order by id belongs there. A cloud data warehouse stores columnar data with separate storage and compute and runs complex SQL with many joins over long history in seconds, so the monthly finance report fits there. A real-time OLAP engine such as ClickHouse, Druid or Pinot ingests streams continuously and answers simple aggregations over fresh data in tens of milliseconds at high concurrency, so the customer-facing dashboard fits there.

Why this question is asked

Teams today can choose between more kinds of analytical systems than ever, and the result is often a mess of copies chosen by fashion. Interviewers ask this question to check that we know what each system is physically good at and can match it to a requirement with clear reasons: freshness, latency, concurrency, query complexity and cost. In this answer, we will recap row and column storage, describe each of the three systems, place the three workloads from the question, compare their weaknesses, and close with the cost of every extra copy.

1A Quick Recap: Rows and Columns

A row store keeps all columns of a row together on disk. Reading one order with all its fields is one small read, and updating it is cheap, which is why transactional databases such as PostgreSQL and MySQL use row storage. But a query that sums one column over 500 million rows must read every row, including all the columns it does not need.

A column store keeps each column separately, compressed. Summing the amount column reads only that column, often a tenth of the data or less, and similar values compress very well. Updating one row, on the other hand, means touching many column files, so column stores prefer bulk loads and append-heavy data. That one difference explains most of what follows.

2The Three Systems

An OLTP database (online transaction processing) handles many small, concurrent reads and writes with ACID transactions, constraints and row-level indexes. Typical queries touch a handful of rows and finish in milliseconds. It is the source of truth for the business.

A cloud data warehouse, such as Snowflake, BigQuery or Redshift, stores columnar data in object storage and runs SQL on separate compute that can grow for a big query and shrink afterwards. It shines at complex SQL: many joins, window functions, years of history. Latency is seconds, sometimes minutes, and cost follows compute time or bytes scanned. Data usually arrives in batches or micro-batches, minutes to hours old.

A real-time OLAP engine, such as ClickHouse, Apache Druid or Apache Pinot, ingests streams continuously, often straight from Kafka, so data is seconds old. It stores columns with indexes and pre-aggregation suited to filtering and grouping, and answers simple aggregations, such as counts and sums per day for one customer, in tens of milliseconds while serving thousands of queries per second. That is what customer-facing analytics inside a product needs.

What each system is built for
OLTP databaseCloud warehouseReal-time OLAP
Storagerows, B-tree indexescolumns, separate computecolumns, indexes, pre-aggregation
Freshnessimmediateminutes to hoursseconds
Query latencymilliseconds for few rowssecondstens of milliseconds
Concurrencyhigh for small querieslow to moderatehigh
Strengthtransactions, point lookupscomplex joins over historyfast aggregations, fresh data
Weaknesslarge scanshigh concurrency, sub-secondlarge joins, updates

3Placing the Three Workloads

The lookup of one order by id is a point read of one row that may have changed a second ago. It goes to the OLTP database, which answers it in a millisecond through the primary key index. Sending it to an analytical system would be slower and possibly stale.

The internal monthly finance report joins orders, refunds, currencies, accounts and cost centres over a month or a year, run by a few people once a month. Latency of seconds is fine, the logic is complex and must match finance definitions, and the warehouse holds the full history. So it belongs in the warehouse.

The customer-facing dashboard, refreshed every few seconds, needs fresh data, fast answers and many concurrent users, perhaps thousands of customers each loading their own charts. The queries are simple aggregations filtered by customer id. A real-time OLAP engine fed from Kafka is built for exactly this. Running it on the warehouse would be slow at that concurrency and expensive, and running it on the OLTP database would put heavy scans next to the transactions.

SQL
-- OLTP (PostgreSQL): one order
SELECT * FROM orders WHERE id = 98123; -- 1 row, about 1 ms
-- Warehouse: monthly finance report
SELECT cc.name, sum(o.amount_eur) FROM orders o
JOIN cost_centres cc ON ... JOIN fx_rates fx ON ...
WHERE o.booked_at >= '2026-10-01' AND o.booked_at < '2026-11-01'
GROUP BY cc.name; -- seconds, complex joins
-- Real-time OLAP (ClickHouse): customer dashboard
SELECT toStartOfHour(ts) h, count() FROM events
WHERE customer_id = 42 AND ts > now() - INTERVAL 1 DAY
GROUP BY h ORDER BY h; -- tens of ms, data seconds old

4Where Each One Is Weak

Real-time OLAP engines are weaker at large joins between big tables, because they are optimised for one wide fact table with small dimension lookups, and at updates and deletes of individual rows, which they handle through background rewrites or special table engines. Warehouses are weaker at high query concurrency and sub-second latency, because each query has start-up cost and they are priced per compute. OLTP databases are weak at large scans and aggregations, and running them there competes with the transactions that pay the bills. Knowing these weaknesses is what stops us from forcing one system to do another's job.

5The Cost of Every Extra Copy

Each of these systems is another copy of the data with its own pipeline, lag, schema changes, access controls and deletion obligations, for example when a customer asks for their data to be erased. So the choice should follow real needs. If the customer dashboard can tolerate data an hour old and modest concurrency, the warehouse with a cache or summary tables might be enough. If the finance report could run on a read replica of the OLTP database because the data is small, perhaps no warehouse is needed yet. We add a system when freshness, latency or concurrency requirements demand it, and we write down which system is authoritative for which numbers.

6Follow-up questions

Can PostgreSQL do real-time analytics too?

For modest data, yes: a read replica with good indexes, partitioning and materialised views can serve dashboards over tens of millions of rows. Extensions and column storage add-ons extend that. Once data reaches billions of events with high query concurrency, a dedicated column engine is usually cheaper and faster.

Why do warehouses separate storage and compute?

So that storage can grow cheaply in object storage while compute scales up for a big query and down to zero when idle, and so several independent compute clusters can read the same data without competing. The trade-off is start-up and network cost per query, which is why latency is seconds rather than milliseconds.

What feeds the real-time OLAP engine?

Usually events on Kafka, either the application's own events or a CDC stream from the OLTP database, ingested continuously with seconds of delay.

7Conclusion

In this answer, we saw that row storage serves transactions and point lookups while column storage serves aggregations over many rows. The OLTP database holds the order looked up by id, the cloud warehouse with separate storage and compute runs the complex monthly finance report, and the real-time OLAP engine fed from Kafka serves the fresh, high-concurrency customer dashboard in tens of milliseconds. Each has clear weaknesses, and each extra system is another copy to sync and govern, so we add one only when freshness, latency or concurrency requires it.

What to say in the interviewAbout 80 seconds aloud

Open with

The three are built for different jobs. An OLTP database like PostgreSQL stores rows with B-tree indexes and handles many small reads and writes with transactions, so looking up one order by id belongs there: it is fresh and takes a millisecond.

Then, if they want more

A cloud warehouse like Snowflake or BigQuery stores columns in object storage with separate compute, so it is great at complex SQL with many joins over years of history, with latency in seconds and cost per query or compute time. The monthly finance report fits there: complex logic, few users, seconds are fine.

A real-time OLAP engine like ClickHouse, Druid or Pinot ingests streams continuously, keeps columns with indexes and pre-aggregation, and answers simple aggregations over data that is seconds old in tens of milliseconds at high concurrency, so the customer-facing dashboard refreshed every few seconds goes there.

Each has weaknesses: real-time OLAP is weak at big joins and updates, warehouses at high concurrency and sub-second latency, and OLTP at large scans. And every extra system is another copy to keep in sync, secure and govern, so I would only add one when the freshness, latency or concurrency needs really require it.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "What is each of the three built for, and which would you pick for an internal monthly...": https://scrivio-interview-library.netlify.app/architecture/storage-and-pipelines/d04a660126/