Your utility company streams 20 TB of smart-meter readings into BigQuery every day. Each record has meter_id (INT64), reading_time (TIMESTAMP), and consumption_kwh. Two dominant query patterns exist: (1) a near-real-time dashboard that aggregates all meters' data for the last 48 hours, and (2) ad-hoc support queries that fetch several weeks of history for a single meter_id. To cut scan costs yet keep the dashboard under 5 seconds, which table design should you deploy?
Use ingestion-time partitioning on _PARTITIONTIME with no clustering.
Partition the table by DATE(reading_time) on a daily basis and cluster by meter_id.
Keep the table unpartitioned and rely on automatic column pruning to reduce scanned bytes.
Partition the table by an integer range on meter_id (for example, 10,000-row buckets) and cluster by reading_time.
Partitioning a table on a DATE-typed timestamp column means queries that filter on that column can prune entire partitions and read only the relevant days. Because the dashboard always restricts results to the most recent 48 hours, daily partitions on DATE(reading_time) limit the scan to two partitions, sharply reducing processed bytes and latency. Adding clustering on meter_id orders data within each daily partition, so a query that specifies a single meter_id touches only the small set of blocks containing that value, lowering cost and improving speed. Partitioning by meter_id would force the dashboard to scan every partition for the last two days; ingestion-time partitioning may mis-align when late data arrives; leaving the table unpartitioned forfeits any pruning. Therefore, daily partitioning on DATE(reading_time) combined with clustering on meter_id best satisfies both cost and performance requirements.
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 work in BigQuery?
Open an interactive chat with Bash
Why is DATE(reading_time) better for partitioning over ingestion-time partitioning?
Open an interactive chat with Bash
What is table partitioning in BigQuery?
Open an interactive chat with Bash
What is clustering in BigQuery tables?
Open an interactive chat with Bash
Why is DATE(reading_time) preferred over ingestion-time partitioning?
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 .