System Design · Senior · Question 39 of 75
How do you build an analytics dashboard over millions of events so it opens quickly?
- ✓Correct answer: Pre-aggregate data on the server and send the client only the needed points
- 2Load all events into the browser and compute charts on the client
- 3Build charts from raw data in the main transactional database
Explanation
Separate read models (CQRS, OLAP stores) keep aggregates by interval; a chart receives a downsampled series. Heavy analytics queries must not load the main database.