After migrating a star-schema sales warehouse to BigQuery, queries on the last 30 days are slow. According to Google best practices, how do you speed queries without increasing storage cost?
Choose an answer
Tap an option to check your answer.
Correct answer: Partition the data by transaction date..
Why this is the answer
Partitioning the data by transaction date is the most effective solution for speeding up queries on recent data without increasing storage costs. BigQuery's partitioning allows queries to scan only the relevant partitions (e.g., the last 30 days), significantly reducing the amount of data processed and improving query performance. Denormalizing the data might improve some query performance by reducing joins, but it doesn't specifically address the "last 30 days" query pattern and could increase storage if not carefully managed. Sharding by customer ID would not optimize queries based on transaction date; it would still require scanning across many shards to find recent transactions for all customers. Materializing dimensional data in views would not help with the fact table's performance for date-based filtering.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed