A retailer archives 2 TB of JSON clickstream logs to Cloud Storage every night. Analysts run most ad-hoc queries against data from the last seven days, occasionally widening the window to a full year. You will load the data into BigQuery and must keep query costs low while giving analysts fast results without having to create or drop tables each day. What should you do?
Create an unpartitioned table and rely on automatic query caching.
Enable the BigQuery BI Engine and leave the table unpartitioned.
Create a time-partitioned table on the event_date column and cluster the table by user_id before loading the data.
Load each daily file into its own table (tablename_YYYYMMDD) and use wildcard tables in queries.
Creating a time-partitioned table on the event_date column means BigQuery automatically places each day's data in its own partition as it is loaded, so no extra tables or manual maintenance are required. Queries that filter on a seven-day window scan only those partitions, dramatically reducing the number of bytes read and therefore cost. Clustering the same table by user_id further prunes blocks inside the selected partitions, accelerating common user-centric queries. The other options either scan the entire table (unpartitioned), require manual table management (daily sharded tables), or add an unrelated feature (BI Engine) without addressing cost from unnecessary data scans.
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 a time-partitioned table in BigQuery?
Open an interactive chat with Bash
What does clustering by user_id mean in BigQuery, and how does it help?
Open an interactive chat with Bash
How does query caching work in BigQuery, and why isn't it sufficient here?
Open an interactive chat with Bash
What is a time-partitioned table in BigQuery?
Open an interactive chat with Bash
Why does clustering a table by user_id improve query performance?
Open an interactive chat with Bash
How does BigQuery query caching work?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Planning and implementing a cloud solution
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
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .