nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #182

You have a query that filters a BigQuery table using a WHERE clause on timestamp and ID columns. By using bq query -dry_run you learn that the query triggers a full scan of the table, even though…

The correct answer is C. Recreate the table with a partitioning column and clustering column. Explanation/Reference: https://cloud.google.com/bigquery/docs/best-practices-costs

Submitted by rania.sa· Mar 30, 2026Designing data processing systems

Question

You have a query that filters a BigQuery table using a WHERE clause on timestamp and ID columns. By using bq query -dry_run you learn that the query triggers a full scan of the table, even though the filter on timestamp and ID select a tiny fraction of the overall data. You want to reduce the amount of data scanned by BigQuery with minimal changes to existing SQL queries. What should you do?

Options

  • ACreate a separate table for each ID.
  • BUse the LIMIT keyword to reduce the number of rows returned.
  • CRecreate the table with a partitioning column and clustering column.
  • DUse the bq query - -maximum_bytes_billed flag to restrict the number of bytes billed.

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    11% (3)
  • C
    82% (23)
  • D
    4% (1)

Explanation

Explanation/Reference: https://cloud.google.com/bigquery/docs/best-practices-costs

Topics

#BigQuery partitioning#BigQuery clustering#query optimization#cost reduction

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice