A BigQuery query with WHERE on timestamp and ID still triggers a full table scan. With minimal SQL changes, how do you reduce bytes scanned?
Choose an answer
Tap an option to check your answer.
Correct answer: Recreate the table with a partitioning column and clustering column..
Why this is the answer
Partitioning a BigQuery table by the timestamp column and clustering by the ID column significantly reduces bytes scanned. Partitioning divides the table into smaller, manageable parts based on a column (like date), allowing BigQuery to scan only relevant partitions. Clustering further organizes data within those partitions based on another column (like ID), enabling BigQuery to skip irrelevant blocks of data within a partition. This combination directly addresses the problem of full table scans by optimizing data organization for common query patterns. Creating separate tables for each ID is inefficient and difficult to manage. LIMIT only restricts output, not the bytes scanned. The --maximumbytesbilled flag is a cost control mechanism, not a performance optimization for reducing bytes scanned.
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