concept

View Staleness Window

The maximum age of data in a precomputed view, which must be an explicit, monitored contract rather than an incidental property.

A materialised view trades freshness for query speed: an expensive aggregation is computed in advance so reads are cheap. The question that determines whether it is safe is how stale it may be, and the answer must be stated, agreed with the business, and monitored.

Refresh strategies and the windows they produce: scheduled refresh gives a window equal to the interval and is simplest; incremental refresh updates only what changed and gives a much shorter window at the cost of complexity; event-driven refresh from a change stream gives seconds and makes the view a projection; on-read refresh when stale gives correctness with unpredictable latency.

Two operational requirements that are routinely omitted:

Expose the freshness. A timestamp on the view, surfaced in the interface where users act on it. A dashboard silently showing yesterday's figures is worse than one that says it is showing yesterday's figures.

Alert on lag, because a stalled refresh presents as plausible data rather than as an error — the most dangerous failure mode a view can have.

And the view must be rebuildable from source, which is what makes it disposable when the definition changes or a bug is found.