Skip to main content
Rasad

Blog

Blog Overview

Warehouse or Operational Database: Where Reports Belong

PublisherAbwab Admin
Published OnDec 5, 2026
Reading Duration8 min read
Last UpdateDec 5, 2026
Warehouse or Operational Database: Where Reports Belong

When reading from the operational database is enough, when a replica helps, and when a warehouse becomes necessary, plus what none of them fixes.

The first report in any system is built on the operational database, because that is where the data actually is. That is the right call on the day: fast to build, no new infrastructure, and the number matches what the user sees on screen. The problem is not accuracy but contention. A heavy aggregate over a large table competes with checkout for CPU and disk, and latency rises at the moment that can least afford it.

This article is about where the query runs and what that costs, not about what a dashboard should look like. What the dashboard itself must answer is collected in our BI dashboard requirements checklist. Here we ask one question: does this report read from the operational database, an isolated replica, or a warehouse? The answer depends on three things: the freshness required, the load allowed, and how many conflicting definitions exist.

The question is not where the data lives

It is easy to frame this as a choice between two systems, but it is usually a choice between two loads. The operational database is built for a small transaction written and read quickly with predictable latency. Analysis is built for scanning many rows, reading whole tables and joining multiple sources. Putting both on the same machine means each pays for the other, and the bill arrives at the worst time: month end, a campaign, or a financial close.

A read replica is the intermediate answer people forget. A read-only copy fed from the log takes analytical queries off the write path without building a full warehouse. But it gives you neither a shared definition nor organised history, because it is a copy of the current shape, not a model for analysis. Teams that assume a replica is enough usually have not tried the question that needs data from three months ago.

Four differences to settle before choosing

The table is not a product recommendation or a vendor comparison. It is the differences that actually show up six months into operation. Read each row with one question: does this difference matter now, or in a year? Building early loads the team with maintenance it does not need; building late leaves decisions being made in a temporary report.

DimensionFrom the operational databaseFrom a warehouse
FreshnessImmediate, matching the screen exactlyMinutes or hours behind, depending on the load schedule
LoadCompetes with transactions for the same resourcesIsolated, so a heavy query never touches checkout
DefinitionEach report writes its own definitionOne shared, tested definition in one place
HistoryOnly what the current tables happen to keepSnapshots and events retained for later questions
CostNo additional infrastructure todayInfrastructure that needs operation, monitoring and upkeep

Notice that the definition and history rows are not solved by a bigger server or a cleverer index. If the problem is that three departments define an active customer in three ways, the fastest database will give you three answers faster. That is why many projects fail: a performance product is bought for a problem of meaning.

One definition, where disputes are settled

Before choosing where queries run, write one definition for every metric that matters: the formula, the grain (one row per what?), the exclusions, the owner, and the date of the last change. That definition is what makes two numbers comparable, and it costs less than any warehouse. Without it, the warehouse itself is built on conflicts and then blamed for producing different numbers.

A good definition is testable. Do not write revenue; write what is included and what is not: does it include tax, does it subtract returns, and on which date is it recognised, order, payment or delivery? Then write a test that produces a known result on known data. A definition that cannot be tested is not a definition; it is an internal slogan.

Checklist: is it time to move?

  1. Analytical queries show up in the latency of a payment or signup path, even only at peak hours.

  2. You need history the tables do not keep, such as a customer's state six months ago or an old product price.

  3. Two reports give different numbers for the same question, each defended with confidence.

  4. A third source must be joined to your data, such as a finance system, a supplier file or another sales channel.

  5. Month-end close becomes an event that stops the team, run on manual files and reminder messages.

  6. Questions arrive that were never planned, by segment, period or channel, with no quick answer.

  7. Backup and restore cannot carry a heavy query during working hours.

  8. A non-technical team requests reports weekly, and each request consumes an engineer's time.

What a warehouse does not fix

A warehouse moves the problem; it does not delete it. If source data is full of duplicates, the warehouse will store the duplicates with greater regularity. If a definition is disputed, it will be built twice inside the warehouse. If the team expects real-time freshness from a nightly load, the warehouse will look slow while working exactly as designed. Moving to a warehouse is an operational decision as much as a technical one.

A common error is to treat the warehouse as a backup. A backup aims to restore a system to a previous state; a warehouse aims to answer questions across time. Confusing them produces a warehouse that cannot restore and a backup that cannot analyse, with false confidence in both.

From reading to shipping

Want this built, not just explained?

Bring us the problem behind the article. We will tell you what it takes, what it costs, and whether we are the right team.

The middle path: three steps without a leap

The first step is a read replica, taking heavy reports off the write path. The second is a small semantic layer that defines metrics once and is used by every report, even while the source is still the operational database. The third is a summary table or materialised view refreshed on a declared schedule, read instead of scanning large tables each time. These three solve most of the problem in most systems, and they are built in weeks rather than months.

A warehouse becomes necessary when the questions outgrow what those steps were built for: multiple sources, long history, and a team analysing without an engineer on every request. Then the question is not whether to buy a warehouse but who will operate it, who owns its definitions, and how you will know it is working, because a warehouse without an owner becomes an expensive archive.

How to start

Start with an inventory of questions rather than tools: write the twenty questions actually asked, the source for each, the freshness it needs, and who decides based on it. This usually shows that three questions need immediate freshness and the rest tolerate hours of delay. That alone cuts the cost of the solution significantly, because you are no longer building for the worst case everywhere.

If the team is moving away from scattered files and sheets, the path still starts by fixing definitions before any migration; we covered how data movement is planned in data migration strategy and how the analyst's role changes once data is trusted in AI and the data analyst. You can look at how we run technical consulting if you want the decision to start from a map rather than a product.

Frequently asked questions (FAQ)

Is a read replica enough instead of a warehouse?

It is enough if the problem is purely load and you need neither organised history nor multiple sources. It is not enough when the question is why two numbers disagree, because a replica carries the current shape, not an analytical model. Try it first; if the problem does not return after two weeks, you do not need a warehouse yet.

Do we need a warehouse if the data is small?

Usually not. Small data means queries will stay fast on the operational database for years, and the real problem then is definition rather than engine. Build a simple semantic layer and defer the warehouse until a need on the checklist appears.

Can a warehouse be real time?

It can, but real-time freshness costs more and is more complex, because it means a continuous stream and lag monitoring instead of a scheduled load you can rerun. Ask first who will act differently if the number arrives a minute later. If the answer is nobody, you are paying for speed that changes no decision.

Who owns a metric definition?

The function that decides on it, not the technical team. Engineering builds, tests and documents, but the party that says this is our definition of revenue is the party asked about the number in a meeting. If no owner exists, every meeting invents a definition, which is the fastest route to numbers nobody trusts.

Sources

  1. PostgreSQL — Hot Standby — running read-only queries on a standby server.

  2. PostgreSQL — Write-Ahead Logging — how changes are written to the log, the basis of replication and recovery.

  3. PostgreSQL — CREATE MATERIALIZED VIEW — storing a query result and refreshing it on demand or on a schedule.

  4. W3C — PROV Model — a model for recording the provenance of derived data.

Cover image: Isaac Smith, Unsplash License, via Unsplash.

Get in Touch

We'd love to hear from you. Fill out the form and we'll get back to you soon.