Question 422 of 503

Quick Answer

The answer is to create a materialized view that aggregates by date, country, and category. This is correct because a BigQuery materialized view precomputes and stores the aggregation results, so queries that filter on date and country and aggregate by category can read the pre-aggregated data instead of scanning the full 20 TB table. This directly reduces query latency by eliminating the need for on-the-fly computation, making sub-5-second response times achievable. On the Google Professional Cloud Database Engineer exam, this scenario tests your understanding of when to use materialized views versus partitioning or clustering alone—a common trap is assuming partitioning or clustering alone can solve latency issues, but they still require scanning all matching partitions and performing aggregation at query time. Remember the memory tip: "Pre-aggregate to accelerate"—if your query pattern involves fixed filters and aggregations, a materialized view is the tool for sub-second latency.

PCDE Practice Question: Define data structures and implement SQL for Business Intelligence

This PCDE practice question tests your understanding of define data structures and implement sql for business intelligence. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company's BI dashboard queries a BigQuery table that is 20 TB and uses clustering on date and country. The query filters on date and country and also aggregates by category. The query takes 30 seconds. They want to reduce latency to under 5 seconds. What should they do?

Question 1hardmultiple choice
Full question →

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

Create a materialized view that aggregates by date, country, and category.

The correct answer is D because a materialized view precomputes and stores the aggregation by date, country, and category, eliminating the need to scan the full 20 TB table on every query. This reduces query latency dramatically by serving pre-aggregated results, directly addressing the filter and aggregation requirements. Partitioning or clustering alone cannot achieve sub-5-second latency on a 20 TB table because they still require scanning all matching partitions or clusters and performing the aggregation at query time.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Partition the table by date.

    Why it's wrong here

    The table is already clustered by date; partitioning would add pruning but the aggregation still scans partitions.

  • Add clustering by category.

    Why it's wrong here

    Clustering on category helps filtering but the aggregation still requires reading all matching rows.

  • Increase query priority.

    Why it's wrong here

    Priority affects scheduling, not the amount of data scanned.

  • Create a materialized view that aggregates by date, country, and category.

    Why this is correct

    Materialized view stores the aggregated result, so query scans only the view.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often assume partitioning or clustering alone can achieve drastic latency reductions, but they overlook that aggregation over a large dataset still requires significant computation, whereas a materialized view precomputes the result, which is the only way to guarantee sub-5-second latency for this workload.

Detailed technical explanation

How to think about this question

Materialized views in BigQuery are stored as physical tables that are automatically refreshed based on the base table's change history, using incremental updates to maintain consistency. Under the hood, the query optimizer rewrites incoming queries to use the materialized view when possible, even if the query does not explicitly reference it, leveraging the precomputed aggregates to avoid full table scans. A real-world scenario where this matters is when dashboards require sub-second response times for interactive filtering by multiple dimensions; without a materialized view, even clustered and partitioned tables would incur seconds of latency due to the aggregation step.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

An e-commerce site experiences heavy traffic on Black Friday and near-zero traffic during off-peak weeks. Rather than provisioning permanent large VMs, the team uses auto-scaling groups that add capacity automatically under load and reduce it overnight. Questions like this test whether you understand elasticity, availability zones, and cloud compute scaling patterns.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCDE practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCDE practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCDE question test?

Define data structures and implement SQL for Business Intelligence — This question tests Define data structures and implement SQL for Business Intelligence — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Create a materialized view that aggregates by date, country, and category. — The correct answer is D because a materialized view precomputes and stores the aggregation by date, country, and category, eliminating the need to scan the full 20 TB table on every query. This reduces query latency dramatically by serving pre-aggregated results, directly addressing the filter and aggregation requirements. Partitioning or clustering alone cannot achieve sub-5-second latency on a 20 TB table because they still require scanning all matching partitions or clusters and performing the aggregation at query time.

What should I do if I get this PCDE question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on PCDE

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. An e-commerce company uses BigQuery for BI. They have a large orders table with columns: order_id, customer_id, order_date, amount, status. Queries frequently aggregate total amount by customer and month. The current table is not partitioned. Users complain about high costs. The table is 2 TB and grows by 50 GB daily. Which action reduces query costs most?

hard
  • A.Partition the table by order_date and cluster by customer_id.
  • B.Use a wildcard table with daily shards.
  • C.Create a materialized view that aggregates by customer and month.
  • D.Set a maximum bytes billed limit on the project.

Why C: Option C is correct because a materialized view pre-aggregates the total amount by customer and month, eliminating the need to scan the full 2 TB table for every query. This drastically reduces the bytes processed per query, directly lowering BigQuery costs. Since the table grows by 50 GB daily, the materialized view incrementally updates, ensuring fresh results without reprocessing historical data.

Variation 2. A company uses BigQuery to generate daily sales reports. The query aggregates sales by product category and region. The table 'sales_raw' is 500 GB and is updated every hour with new transactions. The report runs slowly. What is the most cost-effective method to improve query performance without changing the existing table schema?

easy
  • A.Partition the table by product category
  • B.Create a separate summary table using scheduled queries
  • C.Create a materialized view that aggregates sales by product category and region
  • D.Cluster the table by region

Why C: Option C is correct because a materialized view in BigQuery pre-computes and stores the aggregated results of the query, allowing subsequent queries to read the pre-aggregated data instead of scanning the entire 500 GB 'sales_raw' table. This reduces both the data scanned and the query execution time, and it is automatically refreshed when the base table is updated (every hour), making it cost-effective as you only pay for the bytes used by the materialized view and the incremental refreshes, not for full table scans.

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCDE 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 PCDE exam.