
Answer-first summary for fast verification
Answer: Partition table data by `create_date`, cluster table data by `location_id`, and `device_version`.
The correct answer is **B**. Partitioning the table by `create_date` reduces the data scanned for date-specific queries, while clustering by `location_id` and `device_version` groups related data together, improving query performance by minimizing irrelevant data reads. - **Option A** suggests clustering by all three fields, which may not be as efficient due to potential over-segmentation. - **Option C** proposes partitioning by all three fields, which is less optimal for fields not frequently used in filters. - **Option D** incorrectly orders clustering and partitioning, which could hinder performance.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are tasked with optimizing the structure of IoT sensor data stored in BigQuery for queries that frequently filter by location_id and device_version. Which data structuring strategy would best enhance both cost efficiency and performance?
A
Cluster table data by create_date, location_id, and device_version.
B
Partition table data by create_date, cluster table data by location_id, and device_version.
C
Partition table data by create_date, location_id, and device_version.
D
Cluster table data by create_date, partition by location_id, and device_version.
No comments yet.