Topic 1 Question 304
You have a table that contains millions of rows of sales data, partitioned by date. Various applications and users query this data many times a minute. The query requires aggregating values by using AVG, MAX, and SUM, and does not require joining to other tables. The required aggregations are only computed over the past year of data, though you need to retain full historical data in the base tables. You want to ensure that the query results always include the latest data from the tables, while also reducing computation cost, maintenance overhead, and duration. What should you do?
Create a materialized view to aggregate the base table data. Include a filter clause to specify the last one year of partitions.
Create a materialized view to aggregate the base table data. Configure a partition expiration on the base table to retain only the last one year of partitions.
Create a view to aggregate the base table data. Include a filter clause to specify the last year of partitions.
Create a new table that aggregates the base table data. Include a filter clause to specify the last year of partitions. Set up a scheduled query to recreate the new table every hour.
ユーザの投票
コメント(4)
- 正解だと思う選択肢: A
- Materialized View: Materialized views in BigQuery are precomputed views that periodically cache the result of a query for increased performance and efficiency. They are especially beneficial for heavy and repetitive aggregation queries.
- Filter for Recent Data: Including a clause to focus on the last year of partitions ensures that the materialized view is only storing and updating the relevant data, optimizing storage and refresh time.
- Always Up-to-date: Materialized views are maintained by BigQuery and automatically updated at regular intervals, ensuring they include the latest data up to a certain freshness point.
👍 2raaad2024/01/11 - 正解だと思う選択肢: B
B. Create a materialized view to aggregate the base table data. Configure a partition expiration on the base table to retain only the last one year of partitions.
👍 1scaenruy2024/01/04 - 正解だと思う選択肢: A
To preserve the historical data
👍 1Sofiia982024/01/11
シャッフルモード