Apply Looker aggregate awareness: fit summary tables and diagnose misses
Looker aggregate awareness automatically selects the smallest summary table that can answer a query accurately. Developers define persisted aggregate tables inside an Explore with combinations of dimensions, measures, and filters. Looker can use them for compatible queries and fall back to the source table when finer detail is needed. The feature works through the existing Explore.
This guide follows official Google Cloud Looker documentation read 2026-11-19. Aggregate awareness is an optimization, not a repair for incorrect metrics or a flawed source model. Verify table selection and values in Development Mode SQL and by comparing representative results.
Which queries can use a summary?
An aggregate table is a roll-up of detailed data. If the source has one row per order, a daily sales table can answer monthly questions by rolling days up; a weekly query may also use daily summaries. A drill that needs per-order detail may require the source table. Looker tries to choose the most efficient matching table while preserving accuracy.
Documented measure types include sum, count, min, max, and average. Average can be recomputed from sum and count. Distinct count, median, percentile, and other measures that cannot be correctly rolled up may not be supported. With joins, Looker can render some measures as DISTINCT to avoid fanout; validate the actual model.
Design the aggregate_table
Define aggregate_table inside the Explore. Its query can specify dimensions, measures, optional filters and sorts, and timezone; materialization sets persistence. The aggregate must be persisted in the database and shares connection/dialect prerequisites with PDTs.
| Design factor | Check |
|---|---|
| Dimensions and grain | Which time unit and attributes define one row? Extra dimensions increase size. |
| Measures | Can they be accurately recombined at coarser grain? Preserve sum and count for averages. |
| Filters | Do fixed filters narrow the table beyond users’ queries? Are query filter fields represented? |
| Time zone | Does the aggregate timezone match the Explore query? A mismatch can prevent use. |
| Refresh and storage | Does the persistence strategy meet freshness goals? Are dialect-specific indexes or partitions supported? |
More dimensions can match more queries, but grow the aggregate. Too few dimensions or filter fields reduce reuse. Start with frequently run, slow dashboards or Explores and balance query benefit with build and storage cost. Avoid precomputing every possible field combination.
Implement and validate
Where available, use System Activity to identify dashboards and Explores with high frequency or runtime; permissions may be required.
Record the actual dimensions, measures, filters, time zone, and freshness requirement. Confirm the query represents a repeated business question.
Run the target query in an Explore and use Get LookML’s Aggregate Table option as a starting point. Review grain, filters, and persistence before adding the LookML.
In Development Mode, validate LookML, build the aggregate, and inspect generated SQL. SQL comments may identify the table used or why one was skipped. Compare results with the source query over representative periods.
Vary filters, time zones, and drill detail. Falling back to the source can be correct.
Align freshness and build cost with operational goals; review and deploy changes normally.
If Looker skips the aggregate
Check the SQL tab in Development Mode for comments about aggregate-table selection, including a message beginning “Did not use [explore]::[aggregate table]”.
**Missing fields:** ensure query dimensions, measures, and filter fields are covered. Coarser timeframes can sometimes be derived from finer ones.
**Filter mismatch:** a query filter may be missing, or a fixed aggregate filter may be narrower than the query. Add needed fields or align conditions.
**Measure cannot roll up:** check measure type and DISTINCT/symmetric aggregate behavior introduced by joins.
**Time-zone mismatch:** match the aggregate’s timezone to the query; user-specific zones may require multiple aggregates.
**Fresh data absent:** data added after the aggregate was built may be missing. Inspect whether generated SQL combines recent source rows with the aggregate.
**A better table exists:** when multiple candidates fit, choosing a smaller one may be expected.
Evaluate storage, build latency, query latency, correctness, and freshness together. Selecting an aggregate is not success by itself: values must remain correct, useful drill must work, and data freshness must meet requirements.
Sources
[Aggregate awareness](https://docs.cloud.google.com/looker/docs/aggregate_awareness)
[aggregate_table parameter](https://docs.cloud.google.com/looker/docs/reference/param-explore-aggregate-table)
[Aggregate awareness tutorial](https://docs.cloud.google.com/looker/docs/best-practices/aggregate-awareness-tutorial)
[Derived tables and PDTs](https://docs.cloud.google.com/looker/docs/derived-tables)