A streaming pipeline writes 2 TB of structured click-stream data into BigQuery each day. Analysts run interactive dashboards that usually filter by event_date (last 60 days) and customer_id, and occasionally also filter by country. Query latency must stay under 5 seconds while storage and analysis costs should be minimized. Which table design best satisfies these requirements?
Create an unpartitioned table and add clustering on event_date, customer_id, and country
Use ingestion-time partitioning and rely on materialized views to accelerate the dashboards
Partition by customer_id and cluster by event_date
Partition by event_date and cluster by customer_id, with an optional secondary cluster column on country
Partitioning the table on event_date limits each query to 60 daily partitions instead of the full table, drastically reducing bytes scanned. Clustering on customer_id (and optionally country) further co-locates rows with similar keys, so filter predicates eliminate additional blocks inside the selected partitions. This combination yields the lowest scan cost and fastest performance. Partitioning on customer_id is impractical because of the very high cardinality, and clustering alone or ingestion-time partitioning would still require full-table scans across many blocks.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is table partitioning in BigQuery?
Open an interactive chat with Bash
How does clustering in BigQuery improve query performance?
Open an interactive chat with Bash
Why is partitioning by customer_id impractical in this scenario?
Open an interactive chat with Bash
What is partitioning in BigQuery and how does it optimize query performance?
Open an interactive chat with Bash
What is clustering in BigQuery, and why was customer_id chosen for clustering?
Open an interactive chat with Bash
Why is partitioning by customer_id considered impractical for this use case?
Open an interactive chat with Bash
What is partitioning in BigQuery?
Open an interactive chat with Bash
What is clustering in BigQuery?
Open an interactive chat with Bash
Why is 'partition by customer_id' not ideal in this use case?
Open an interactive chat with Bash
GCP Professional Data Engineer
Storing the data
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .