Engineering Decisions · Middle · Question 8 of 14
A sales dashboard runs a 40-second aggregation on each load. Managers open it a few times a day, and data from the last hour is enough. What's the fix?
- 1A background job per user, emailing the report
- 2A materialized view refreshed every hour
- 3A read replica that runs the same query
Show the answer
Correct answer: A materialized view refreshed every hour
Explanation
Precomputed results load instantly, and hourly freshness is exactly what the managers need. A replica fits heavy reads that must be near real time and protects the primary, but the page would still take 40 seconds. Emailed reports fit people who want a digest, and they would replace an interactive dashboard that is used directly.