System Design · medium

A dashboard is slow to load. Where do you look?

Asked in BI Developer interviews, in the System Design round.

Short answer

Usually the query, not the tool: too fine a grain pulled to the client, a live query where an extract would do, or unfiltered scans. Pre-aggregate in the warehouse to the grain the dashboard actually shows, push filters down, and cache or extract where freshness allows. Row-level detail behind a summary should load on demand, not upfront.

How to answer it

The query, almost always. The tool renders a few hundred numbers in milliseconds; what takes 30 seconds is fetching a few hundred million rows to compute them.

Look in this order:

Worked line: "The executive dashboard ran 14 live queries against a 2 billion-row fact table on open. A nightly mart at the daily-by-region grain has 40,000 rows; the dashboard reads that, loads in under two seconds, and the detail page queries the fact table only when someone drills."

Related questions

Practice this for real