參考答案
C. Create a materialized view that aggregates retail_ops.sales_events and restricts it to the last 12 months of partitions.
The correct option is Create a materialized view that aggregates retail_ops.sales_events and restricts it to the last 12 months of partitions.
A materialized view precomputes AVG, MAX, and SUM and incrementally refreshes only the portions of data that change. This gives very low latency and cost for dashboards and services that run frequent aggregate queries. Restricting the materialized view to the most recent 12 months means queries scan far less data while the base table continues to hold all historical rows for auditing. BigQuery can also rewrite compatible queries to use the materialized view which reduces operational upkeep because clients do not need to change their SQL.
Enable BigQuery BI Engine and query retail_ops.sales_events with a filter for the last 12 months of partitions is not the best fit because BI Engine is an in memory acceleration layer that does not precompute or incrementally maintain aggregates. You still pay for repeated scans or a large reservation and you do not get the same cost savings and simplicity that a preaggregated result provides.
Create a scheduled query that rebuilds a 12 month aggregate summary table every 30 minutes is inefficient and increases maintenance. It introduces staleness between runs and repeatedly recomputes the entire window which drives cost and fails the requirement for near real time results.
Create a materialized view on retail_ops.sales_events and configure a partition expiration policy on the base table so only the last 12 months are kept violates the requirement to preserve all historical rows for auditing because an expiration policy would delete older partitions from the base table.
When you see frequent aggregate queries that must stay fresh with low latency and cost, think materialized views. If the problem mentions an auditing need, avoid any option that expires or deletes base data.