Google Professional Data Engineer Question 127
Select 3Google Cloud PlatformYour team is analyzing data access patterns for a retail analytics platform hosted on Google Cloud. The platform uses BigQuery for data warehousing and Cloud Storage for storing raw data. You notice that certain datasets in BigQuery are queried significantly more frequently than others, leading to increased query costs and latency. What steps could you take to optimize performance and reduce costs based on these access patterns?
- A
Implement BigQuery table partitions and clustering to optimize query performance and reduce scanned data.
- B
Enable BigQuery streaming for all datasets to ensure real-time data availability.
- C
Move frequently accessed raw data from Cloud Storage to BigQuery to reduce data transfer costs.
- D
Use BigQuery materialized views to precompute and cache results for frequently queried datasets.
- E
Configure BigQuery reservations to allocate compute resources for high-priority queries.
Show answer and explanation
Correct answers: A, D, E
Explanation
To optimize performance and reduce costs in BigQuery based on access patterns, you should focus on strategies that reduce scanned data, improve query efficiency, and manage resource allocation. Table partitions and clustering help optimize query performance for large datasets. Materialized views are effective for precomputing results of frequently queried data. Reservations ensure resources are allocated effectively for high-priority queries. Streaming or moving raw data to BigQuery does not directly address the observed issue in this scenario.
- A. Correct.
Implementing table partitions and clustering helps optimize query performance by reducing the amount of data scanned during queries. This is effective for datasets with predictable access patterns.
- B. Incorrect.
BigQuery streaming is used for ingesting real-time data but does not directly optimize costs or performance for frequently queried datasets.
- C. Incorrect.
Moving raw data from Cloud Storage to BigQuery could increase costs unnecessarily, as BigQuery storage is more expensive. This is not a recommended optimization for access patterns.
- D. Correct.
Materialized views in BigQuery can precompute and cache query results, improving performance and reducing query costs for frequently accessed datasets.
- E. Correct.
BigQuery reservations allow you to allocate compute resources to high-priority workloads, ensuring better performance for critical queries and controlling costs.