The interview problem
An analytics dashboard reads precomputed results. Design refresh and publication so users can tell how current and complete the data is.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume an authoritative source and a dashboard that accepts bounded staleness. Track source watermark, refresh start/end and published view version. Compute a replacement snapshot or apply supported incremental updates, then expose only a consistent published version. Distinguish source lag from refresh lag. Display an as-of boundary and mark failures without silently advancing freshness metadata.
2. Trace the design or derivation
Capture source boundary → compute view → validate totals → publish version → expose as-of time
For multiple inputs, retain a watermark vector instead of inventing one timestamp that hides a lagging source. If the product requires a common cutoff, choose and document the slowest compatible boundary. Refresh success and business completeness should be separate indicators so operators can see which part failed.
3. Calculate the example
The source watermark is 12:00, refresh starts 12:05 and finishes 12:08. The published view is complete only through 12:00, not 12:08. At 12:10 its source-data age is ten minutes despite a two-minute-old successful refresh.
4. Failure cases and trade-offs
A refresh may read an inconsistent source boundary unless snapshot semantics are defined. Incremental maintenance can miss corrections or deletions. Full rebuilds are simpler but expensive; incremental updates lower work while adding reconciliation requirements. A stale but complete view may be preferable to a fresh partial one.
5. Validation, follow-ups and self-review
Fail refresh midway, introduce late corrections and compare with a full recomputation. Follow-up: what does freshness mean across multiple sources? Self-review: name the completeness watermark and atomic publication boundary.
Sources and related practice
Technical reference: www.postgresql.org — Persisted query results and refresh behavior; freshness contract is original.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Join two event streams with late arrivals; Skip irrelevant row groups in analytical scans.
Continue your preparation
Choose a connected learning path or browse more System design questions. Read our editorial method and attribution policy.