Courseiva
mediumMultiple Choice

Improve BigQuery Query Performance with Reclustering

A company stores IoT sensor data in BigQuery. Queries that filter on a timestamp column and a device_id column are slow even though the table is partitioned by day. What should the data engineer do to improve query performance?

⚠ Common exam trap

Google Cloud often tests the distinction between partitioning (which prunes by time) and clustering (which prunes by non-time columns), and the trap here is assuming that partitioning alone is sufficient for all filter columns, leading candidates to choose an option that changes the partition strategy rather than adding clustering.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Cluster the table on device_id

Clustering on device_id organizes the data within each day partition by device_id, allowing BigQuery to prune blocks during queries that filter on that column. This reduces the amount of data scanned and improves query performance without changing the partitioning scheme. Partitioning alone only limits scans by time range; clustering adds intra-partition sorting for non-time-based filters.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Increase the partition size to monthly

    Why it's wrong here

    Monthly partitioning coarsens granularity, so timestamp filters scan more data per partition rather than less. It is tempting because fewer partitions reduce metadata overhead, which suits low-cardinality date ranges, but here it worsens pruning on daily-filtered queries.

  • ✗

    Switch to ingestion-time partitioning instead of column-based

    Why it's wrong here

    Ingestion-time partitioning partitions on load time, not the timestamp column being filtered, so it cannot prune by event time and would worsen this scan. It is the right choice when arrival time is the query axis and no reliable event-time column exists.

  • ✗

    Enable automatic query rewriting with BI Engine

    Why it's wrong here

    BI Engine is an in-memory acceleration layer for sub-second BI dashboards and lookups; it does not add a clustering key, so device_id filtering still scans every partition block. It would be correct for accelerating repeated interactive dashboard queries, not for restructuring storage.

  • ✓

    Cluster the table on device_id

    Why this is correct

    Partitioning by day prunes on the timestamp filter, but device_id predicates still scan every partition. Clustering sorts data within each partition by device_id, so BigQuery reads only the relevant blocks, cutting bytes scanned and improving filter performance.

About these practice questions

This PDE question is part of Courseiva's 747-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.