Optimizing BigQuery Aggregation Costs with Materialized Views
Short answer
B Create a materialized view to minimize repetitive computations.
Question
Key Takeaways
Materialized views store precomputed results, avoiding redundant aggregation costs; they are ideal when the same complex query runs frequently.
Learn how to reduce BigQuery analytics spend and speed up repeated aggregations using materialized views, the optimal solution for precomputed query results.
Common mistake: Partitioning (D) is often chosen incorrectly because it reduces scan size, but it does not prevent the computation of aggregations, whereas materialized views skip the computation entirely.
Expert Analysis
The scenario focuses on optimizing BigQuery costs and performance for queries that repeatedly execute the same aggregation (store ID and real-time sales volume). The key constraint is minimizing analytics spend while ensuring faster results.
BigQuery materialized views are specifically designed to address this pattern. When a materialized view is created, BigQuery precomputes and stores the result of the defined query. Subsequent queries referencing this materialized view can use the stored data instead of re-executing the expensive aggregation logic. This directly reduces the number of bytes processed, thereby lowering costs, and significantly improves query latency because the heavy lifting has already been done.
Option A suggests creating a new table from a CSV file. This approach is manual, does not automatically update with live data changes, and requires ETL overhead, making it unsuitable for 'real-time' or dynamic requirements. Option C mentions join acceleration, which helps with joining large tables but does not solve the problem of repeated aggregation computations. Option D suggests partitioning, which optimizes scans by pruning unnecessary partitions but does not eliminate the need to compute aggregations across the remaining data. Therefore, only materialized views provide the automatic precomputation needed to minimize repetitive work.
Official Reference
https://cloud.google.com/bigquery/docs/materialized-views-intro
This link opens the official vendor documentation in a new tab.
Exam Strategy
When you see keywords like 'repeated query,' 'same aggregation,' or 'minimize compute cost' in BigQuery scenarios, prioritize materialized views. They trade storage space for compute savings by caching results, which is distinct from partitioning (which saves I/O) or clustering (which organizes data within partitions).
Frequently Asked Questions
Do materialized views update automatically?
What is the difference between a logical view and a materialized view?
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 2 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 2
-
jreale64 👍 1 Answered BB: Materialized views in BigQuery store the precomputed results of a query. Unlike logical views, which execute the query every time they are referenced, materialized views store the result set and automatically update as data in the base tables changes.
-
AwesomeGCP 👍 1 Answered BThe correct answer is B. Create a materialized view to minimize repetitive computations.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.