Where should reports and dashboards run, so they do not slow down the application?
Applications like this: business dashboards, finance reports, product analytics. This page is written the way I write a database design doc: the workload first, then where each kind of data goes and why, then how it grows, what breaks, and what I rejected.
| Dimension | This application |
|---|---|
| Writes | Batch loads or a stream of changes from production. |
| Reads | Big scans with aggregates over a few columns. |
| Read to write | Reads are few but each one reads a lot. |
| Consistency | Minutes behind production is usually fine. |
| Latency | Seconds for a dashboard, minutes for a heavy report. |
| Growth | Large. All history, often from several systems. |
These incidents are why the choices below matter. Each one is written up with its numbers and sources.
Solid arrows: the application writes there. Dashed arrows: a copy fed from the source of truth (change data capture, an outbox, or a cache fill), which can be rebuilt from it.
| Data | Where it goes | Why |
|---|---|---|
| Fact tables (orders, events) | A column store | Reads only the columns a query names, compressed, in parallel. |
| The application data | Stays in the OLTP database | The copy must never be able to slow the source down. |
| The pipeline | Change data capture (Debezium, or the managed equivalent) or scheduled batch exports | Ships ongoing changes without running scans on the primary (after a one-time snapshot). |
How each family of store behaves under traffic: Database families.
-- ClickHouse CREATE TABLE order_lines ( order_id UInt64, created_at DateTime, customer_id UInt64, sku LowCardinality(String), qty UInt32, price_cents UInt64 ) ENGINE = MergeTree PARTITION BY toYYYYMM(created_at) ORDER BY (sku, created_at); SELECT sku, sum(qty * price_cents) / 100 AS revenue FROM order_lines WHERE created_at >= now() - INTERVAL 30 DAY GROUP BY sku ORDER BY revenue DESC LIMIT 20;
Pick a stage, then throw something at it. The numbers are a model to show the shape of each change, not a measurement; the measured numbers are in the lab notebooks.
| What happens | What you see | What I do |
|---|---|---|
| Reports on the primary | The application slows down at report time | Move them. This is the most common cause of mystery slowdowns on a schedule. |
| Single-row inserts into a column store | Too many small parts, merges fall behind | Batch the inserts. |
| Replica used for both failover and heavy reports | A long query delays replay, and the failover target is behind | Separate the two roles. |
Cost. Warehouses bill by data scanned or by compute time. Partition and sort keys that match the common filters are the main lever.
| Stage | Where it runs |
|---|---|
| Where I would start | A managed warehouse or ClickHouse Cloud, fed by CDC |
| When it grows | The same. Self-managed ClickHouse on VMs if scan costs are high and the team exists |
For a team without a dedicated database team. Who does which job in each option, and the full-cost comparison: Where to run the database.
The back-of-the-envelope numbers I would want before choosing anything. Move the assumptions to match your application. The link keeps your numbers, so a colleague sees the same ones.
Which database does my application need? What kind of application data goes in which database, and why, as design docs, plus the anti-patterns and the decisions behind them.