Skip to content
About
Main content
Trade-off

Precompute vs. compute-on-read

Where you meet it: materialized views, ELT vs. ETL, schema-on-read.

What it is

The break-even lives in the ratio of read rate to write rate. This is the same ratio that decides between a B-tree (which favors reads) and an LSM tree (which favors writes). "Precompute versus compute on read" and "read-optimized versus write-optimized" are the same variable. Here it is expressed in money.

From Cost Mechanics › Materialization

The difference between a materialized view (MV) and a cache is not the mechanism. It is who decided what gets stored. A cache discovers by watching reads. An MV is told at design time. Every other difference follows from this, which makes MVs the clean end of a continuum whose other end is an LRU.

From Caching › Materialized views

Where it appears

In 14 mechanisms. Each says what the mechanism is about, then how this trade-off shows up there, in its own words.

Made on the same pages most often.