Star schema vs one big table: which fits your BI stack

When a denormalized wide table beats a star schema, when it backfires, how ClickHouse joins change the answer, and the hybrid most data teams settle on. Measured on ClickHouse 26.11.

Star schema vs one big table comes down to where you pay for the join: a star schema pays at query time and keeps every attribute in one place, while one big table (OBT) pays at build time, queries faster, and makes every attribute change a rewrite of the fact table. Neither wins everywhere. Fivetran’s benchmark on Redshift, Snowflake and BigQuery found the wide table faster by roughly 25 to 50 percent, while materializing the wide table on Redshift took disk use from a bit over 30 GB to over 90 GB. SQLBI’s tests of Power BI reached the opposite verdict for that engine: a star schema was the better choice almost every time. ClickHouse sits closer to the first camp, and its documentation calls joins “inherently more expensive than querying from a single, denormalized table.” We ran both shapes on 50 million rows of ClickHouse 26.11 to put numbers on the trade-off. The short version: the engine and the BI tool decide, and most teams end up with both.

What is a star schema, and what is one big table?

A star schema splits data into a fact table and dimension tables. The fact table holds one row per business event at a fixed grain (one order line, one page view) with foreign keys and numeric measures. Dimension tables hold the descriptive attributes (customer country, product category, plan) with one row per entity. The Kimball Group’s dimensional modeling techniques describe it as fact tables linked to dimension tables through primary and foreign keys.

One big table joins those dimensions onto the fact table once, ahead of time, so every fact row carries its attributes:

ShapeRowsColumnsWhere joins happenAttribute stored
Star schemaFact plus small dimensionsNarrow fact, wide dimensionsEvery queryOnce per entity
One big tableSame as the factFact plus every attributeOnce, at build timeOnce per fact row
Snowflake schemaFact plus normalized dimensionsNarrowestEvery query, more of themOnce per entity, split further

The two are not opposites. An OBT is usually built from a star schema, which matters for the hybrid at the end.

Star schema vs one big table: the trade-offs

ConcernStar schemaOne big table
Query speedPays for joins on every queryFastest on columnar engines; scans one table
StorageEach attribute stored onceAttributes repeated per row; columnar compression softens it
Attribute changesUpdate one dimension rowRewrite every affected fact row
History (SCD type 2)Native: point-in-time join to dimension versionsValues frozen at build time, by design or by accident
Mixed grainsEach fact table keeps its own grainJoining a one-to-many table duplicates measures
UsabilityAnalysts must know the joinsOne table, every column, no joins to get wrong
ReuseConformed dimensions shared by many factsOne table per use case, so they multiply
BI tool fitPower BI, Looker, semantic layersSuperset, Redash, spreadsheets, notebooks, AI SQL

The rows that bite in practice are attribute changes and mixed grains. Speed is easy to see in a benchmark; the cost of a wrong number is not.

What we measured on ClickHouse

We built a star schema with a 50 million row orders fact, a 1 million row customers dimension and a 10,000 row products dimension, then joined them into orders_obt. The data is synthetic and covers calendar year 2025, both fact tables were merged to a single part with OPTIMIZE TABLE ... FINAL, the server was a single node with 16 cores, and each timing is the median of seven warm runs, so treat the ratios as the result, not the milliseconds.

CREATE TABLE orders
(
    order_id    UInt64,
    order_date  Date,
    customer_id UInt32,
    product_id  UInt32,
    quantity    UInt16,
    amount      Decimal(12, 2)
)
ENGINE = MergeTree
ORDER BY (order_date, customer_id);

-- orders_obt: the same columns plus country, plan, segment, signup_date,
-- category, brand and product_name, with the same ORDER BY.
INSERT INTO orders_obt
SELECT o.order_id, o.order_date, o.customer_id, o.product_id, o.quantity, o.amount,
       c.country, c.plan, c.segment, c.signup_date,
       p.category, p.brand, p.product_name
FROM orders AS o
INNER JOIN customers AS c ON c.customer_id = o.customer_id
INNER JOIN products AS p ON p.product_id = o.product_id;

The query is a typical dashboard tile: revenue by country and category for enterprise customers over the last quarter.

-- Star schema
SELECT c.country, p.category, sum(o.amount) AS revenue, count() AS orders
FROM orders AS o
INNER JOIN customers AS c ON c.customer_id = o.customer_id
INNER JOIN products AS p ON p.product_id = o.product_id
WHERE o.order_date >= '2025-10-01' AND c.plan = 'enterprise'
GROUP BY c.country, p.category
ORDER BY revenue DESC
LIMIT 5;

-- One big table
SELECT country, category, sum(amount) AS revenue, count() AS orders
FROM orders_obt
WHERE order_date >= '2025-10-01' AND plan = 'enterprise'
GROUP BY country, category
ORDER BY revenue DESC
LIMIT 5;

Both return identical rows. Here is what each cost:

MeasurementStar schemaOne big table
Query time (median)0.25 s0.10 s
Peak query memoryabout 60 MiBabout 15 MiB
Compressed storage536 MiB (fact plus dimensions)832 MiB
Change one customer’s plan (41 orders)0.26 s, one dimension row2.26 s, mutation across 50M rows
Rename a product category (one sixth of rows)0.11 s2.02 s

The OBT was about 2.5 times faster and used a quarter of the memory, because ClickHouse skipped building two hash tables. The star schema used about 35 percent less disk. Our synthetic attributes are randomly distributed, which is a pessimistic case for compression, so the gap on real data may be smaller. The update rows are the cost the speed hides. On a MergeTree table, an ALTER TABLE ... UPDATE is a mutation, and the ALTER documentation states that mutations execute “by rewriting whole data parts.” Changing 41 rows in the OBT meant rewriting the plan column of every part that held a matching row, here the single 50 million row part. Our post on deleting and updating rows in ClickHouse compares the cheaper alternatives, but none of them make a denormalized attribute free to change.

We also tried replacing both joins with dictGet lookups against in-memory dictionaries. It was the slowest of the three at 0.35 s, because the plan filter called dictGet for every one of the quarter’s 12.5 million rows, while the join built a hash table once. Dictionaries shine for point lookups and enrichment at insert time, less so as a filter on a scan.

Why ClickHouse leans toward one big table

ClickHouse’s default join is a hash join: it reads one side, normally the smaller one, into memory, then streams the other side past it. ClickHouse’s own guide to minimizing and optimizing JOINs says denormalization is “strongly recommended” for real-time or latency-sensitive queries. The engine has improved a lot: automatic swapping of join sides arrived in 24.12, many-table join reordering in 25.9 (on by default from 25.12), and runtime join filters later still. ClickHouse JOIN performance: 7 fixes for slow joins covers those in detail. But the structural cost remains: every query rebuilds the dimension hash tables, and dashboards run the same query many times a day.

The same documentation is just as clear about where denormalization hurts. The denormalization guide says to denormalize tables that change infrequently, and to avoid it for many-to-many relationships, high-cardinality relationships, and data that must update in near real time. In other words: flatten small, stable dimensions; keep volatile or one-to-many data separate.

Which shape suits which engine and BI tool?

The query engine and the BI tool both have a vote, and they do not always agree.

Engine or toolPrefersWhy
ClickHouseOne big table for hot pathsHash joins rebuild per query; denormalization recommended for latency
BigQuery, Snowflake, RedshiftLeans OBT for speed, star for cost and changeFivetran’s benchmark: OBT 25 to 50 percent faster, more storage
Power BI (Import mode)Star schemaMicrosoft and SQLBI both recommend it for performance and DAX
LookerStar schema with modeled joinsExplores define joins; symmetric aggregates need primary keys
Superset, RedashOne table or view per chartJoins live in SQL views or virtual datasets
Semantic layersStar schema underneathJoin graph and grain are what the layer models
AI text-to-SQLFewer, wider tablesFewer joins means fewer ways to get the SQL wrong

Power BI is the strongest case for stars. Microsoft’s star schema guidance says dimension tables enable filtering and grouping while fact tables enable summarization, and recommends that every model table be one or the other. SQLBI’s comparison found the single-table model slightly faster on a few simple queries and far slower once queries grew complex, at nearly three times the memory.

Looker models joins explicitly in an Explore and protects you from fanout with symmetric aggregates, which, in Google’s words, “depend on a unique primary key and the correct join relationship being specified in the model.” A star schema with clean keys is what it expects.

Superset and Redash build each chart from one table or one query. In Superset, joins are written as SQL inside a virtual dataset, which charts then query like a table. The tool does not model the star for you, so either every dataset repeats the joins or you hand it a wide table.

The fanout trap: what goes wrong in a wide table

The quiet failure of one big table is mixing grains. Join a one-to-many table into the fact, and every measure on the “one” side is counted once per match. Here are three orders and four payments, because order 2 was split across a card and a voucher:

CREATE TABLE f_orders (order_id UInt32, amount Decimal(10, 2))
ENGINE = MergeTree ORDER BY order_id;
CREATE TABLE f_payments (order_id UInt32, payment_id UInt32, method String)
ENGINE = MergeTree ORDER BY order_id;

INSERT INTO f_orders VALUES (1, 100.00), (2, 250.00), (3, 80.00);
INSERT INTO f_payments VALUES (1, 11, 'card'), (2, 21, 'card'), (2, 22, 'voucher'), (3, 31, 'card');

SELECT sum(amount) AS revenue FROM f_orders;
-- 430

SELECT sum(o.amount) AS revenue
FROM f_orders AS o
INNER JOIN f_payments AS p ON p.order_id = o.order_id;
-- 680

A wide orders_with_payments table built this way reports 680 in revenue for 430 of orders, and nothing in the table warns you. Every downstream sum(amount) is wrong by the share of split payments. The rule is the Kimball one: a table has exactly one grain, and you only flatten attributes that have one value per fact row. One-to-many data, such as payments, line items or tags, stays in its own fact table or gets aggregated to the fact’s grain (count_payments, has_voucher) before it is joined.

History: what a wide table freezes

An OBT stores the attribute values that were true when it was built. If it is built once and only appended to, old rows keep old values: an order from February still shows the starter plan after the customer upgrades in March. That is either the point-in-time answer you wanted or a bug in every “revenue by current plan” chart. If the OBT is rebuilt from scratch on a schedule, history is rewritten to today’s values instead.

A star schema lets you choose per query: join to the current dimension row for “as is”, or to a type 2 dimension for “as was”. Slowly changing dimension type 2 in SQL and ClickHouse shows the point-in-time join. With an OBT, you choose once, when you build it, and changing your mind means a rebuild.

The hybrid most teams end up with

The pattern that keeps coming back, and that Fivetran’s write-up also lands on, is layered:

  1. Staging: one cleaned model per source table.
  2. Star schema core: conformed dimensions (dim_customers, dim_products) and facts at a declared grain (fct_orders, fct_payments). This is where joins, keys and history are defined once.
  3. Wide serving tables: one big table per hot use case, built from the star, for the dashboards and embedded charts that run the same shape thousands of times a day.

On ClickHouse, a refreshable materialized view is a clean way to build layer 3 without an external scheduler. This one rebuilds the wide table every hour, and the ClickHouse docs on refreshable materialized views state that the result set is “atomically and transparently updated” on each run:

CREATE TABLE orders_wide AS orders_obt;

CREATE MATERIALIZED VIEW orders_wide_refresh
REFRESH EVERY 1 HOUR TO orders_wide AS
SELECT o.order_id AS order_id, o.order_date AS order_date,
       o.customer_id AS customer_id, o.product_id AS product_id,
       o.quantity AS quantity, o.amount AS amount,
       c.country AS country, c.plan AS plan, c.segment AS segment,
       c.signup_date AS signup_date,
       p.category AS category, p.brand AS brand, p.product_name AS product_name
FROM orders AS o
INNER JOIN customers AS c ON c.customer_id = o.customer_id
INNER JOIN products AS p ON p.product_id = o.product_id;

The explicit aliases are not decoration: on 26.11, without them the view fails with THERE_IS_NO_COLUMN, because the output column is named o.customer_id rather than customer_id. A full refresh of our 50 million rows took about 2 seconds on the test machine, but rebuild cost grows with the fact table; once it stops fitting in the refresh interval, switch to an incremental build. Incremental models in ClickHouse covers the patterns.

The hybrid fixes the update problem too. A plan change is one row in dim_customers, and the wide table picks it up on its next refresh instead of through a mutation. You trade freshness for that: the wide table lags the star by up to one refresh interval.

How to choose

  • Start with a star schema if several teams, fact tables or BI tools share the data, if you need history, or if you use Power BI or Looker.
  • Add a wide table for any dashboard, embed or API where latency matters and the query shape is stable. Build it from the star, never from raw sources.
  • Go OBT-only for a single product area with one grain, stable attributes and one consuming tool, such as an event analytics table on ClickHouse.
  • Never flatten one-to-many or many-to-many relationships, or attributes that change in near real time.
  • Write down the grain of every wide table in its description, so the next person does not join payments into it.

Where a semantic layer fits

A semantic layer is what keeps the hybrid honest: it holds the join graph and the grain of each model in one place, so a wide table and the star it came from cannot drift apart. In Goni, mart models join staging models into facts and dimensions and materialize as table or incremental models in ClickHouse, and metrics defined in YAML compile to SQL against those marts. That means metric charts, alerts and AI Q&A read the same definitions. A caveat: ClickHouse is the only warehouse Goni queries, so it suits teams already on ClickHouse or ready to move there. For the modeling side, how to build a semantic layer in ClickHouse walks through the YAML.

FAQ

Is one big table faster than a star schema?

On columnar warehouses, usually yes. Fivetran measured one big table 25 to 50 percent faster on Redshift, Snowflake and BigQuery, and in our ClickHouse test it was about 2.5 times faster with a quarter of the memory. Power BI Import mode is the main exception: SQLBI found a star schema faster for most non-trivial queries there.

What are the disadvantages of one big table?

Every attribute change rewrites fact rows, attributes freeze at build time, storage grows because values repeat on every row, and joining one-to-many data duplicates measures without any warning. Wide tables also multiply, one per use case, until nobody knows which one is correct. Building them from a star schema limits most of these problems.

Does ClickHouse need a star schema?

No. ClickHouse handles joins, but its documentation recommends denormalization for latency-sensitive queries and warns against it for frequently changing, high-cardinality or many-to-many data. Most ClickHouse teams keep a star schema as the modeled core and serve hot dashboards from wide tables built from it, refreshed on a schedule.

Is a star schema still relevant in the modern data stack?

Yes. Cheap storage and columnar engines made wide tables practical, but they did not remove the need for a declared grain, conformed dimensions and history. Power BI, Looker and semantic layers are built around facts and dimensions, and a star schema is usually the source a wide table is built from.

What is the difference between a star schema and a snowflake schema?

In a star schema each dimension is one denormalized table, such as a product table holding category and brand. A snowflake schema normalizes dimensions further into linked tables, such as products, subcategories and categories. Snowflaking saves a little storage but adds joins, so most BI models flatten dimensions into a star.