A 10 PB BigQuery orders table is filtered by country_name and username (both strings); dashboard queries are slow when filters are applied. How should you redesign the table for faster access?
Choose an answer
Tap an option to check your answer.
Correct answer: Cluster the table by country_name and username..
Why this is the answer
Clustering the table by countryname and username is the most effective solution for faster queries. Clustering organizes data in storage based on the specified columns, allowing BigQuery to efficiently prune data during query execution. When queries filter on these clustered columns, BigQuery only scans relevant blocks of data, significantly reducing the amount of data processed and improving performance, especially for large tables like 10 PB. Partitioning by username in addition to clustering by countryname (or vice-versa) would create too many small partitions, as username likely has high cardinality, leading to overhead and potentially slower queries. Partitioning by both countryname and username would also result in an excessive number of partitions. Partitioning by ingestion time (PARTITIONTIME) is irrelevant here as the queries filter on categorical data, not time.
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