Let’s Get Certified
Module 13 / 20 · Preparing and using data for analysis

Reduce dashboard latency at the right grain

Twelve charts compute hourly totals from the same raw telemetry. The team proposes adding capacity. What should you measure first?

Reduce dashboard latency at the right grain

Decompose dashboard time into queueing, scan and execution, network delivery and rendering. Test the same query and filter before and after each change. A city-hour summary accelerates city-hour charts but cannot answer a later request for an individual trip.

In the recording

Precompute trip duration and aggregate by city and hour to avoid repeating the same work in every dashboard chart.

Work through the decision

Twelve charts compute hourly totals from the same raw telemetry. The team proposes adding capacity. What should you measure first?

Check your reasoning

Read the job timeline and query plan. Compare bytes read, filter selectivity, shuffle and queue time. If several charts repeatedly aggregate identical facts, precompute the appropriate grouping and reconcile it to a small raw interval before switching readers.

Cert Espresso · 2:00:35

Decisions and tradeoffs

Materialized aggregate
Reuse a maintained aggregation when queries repeatedly compute the same supported grouping. Check freshness and whether the optimizer uses it.
Partition filter
Bound time-partitioned reads with a selective predicate on the partition column and verify bytes scanned.
BI Engine acceleration
Evaluate an in-memory acceleration reservation for eligible interactive BI queries. Measure the effect on representative requests.
Column masking
Expose an approved masked value to the reader’s identity while preserving protected originals and auditing access.

Test the grain with a small query

In a GoogleSQL query editor, use this self-contained sample to check the day-and-city grain before applying the same logic to a large table.

WITH trips AS (
  SELECT DATE '2026-03-01' AS day, 'Lyon' AS city, 8 AS minutes UNION ALL
  SELECT DATE '2026-03-01', 'Lyon', 12 UNION ALL
  SELECT DATE '2026-03-01', 'Lille', 4
)
SELECT day, city, COUNT(*) AS trips, SUM(minutes) AS minutes
FROM trips
GROUP BY day, city
ORDER BY city;

Expect one Lille trip totaling 4 minutes and two Lyon trips totaling 20 minutes. If a reader later asks for the longest single trip, the count and sum alone cannot recover that value. Include the required measure at the chosen grain or route that request to appropriate detail.

Practice the guide skills

  1. Check which identity and connection the dashboard uses.
  2. Choose a reusable grain and reconcile an example total.
  3. Benchmark materialized views and BI Engine on representative queries.
  4. Inspect plan stages, partitions and queue time for a slow chart.
  5. Compare authorized reader results after masking sensitive columns.

Official objectives for this lesson

Related lesson · Turn a business question into a bounded analytical query

Follow the result into Power BI · Separate visual rendering time from query time

Knowledge check

Reduce dashboard latency at the right grain quiz

Answer 3 questions. Check each answer for an explanation.