Courseiva
easyMultiple Choice

PDE Practice Question: Given the query plan, what is the most likely…

Exhibit

Refer to the exhibit.

```sql
SELECT product_id, SUM(amount) AS total_sales
FROM sales
WHERE sale_date BETWEEN '2024-01-01' AND '2024-12-31'
GROUP BY product_id
```
The job metadata shows: Input: 10 billion rows, Output: 500 million rows, Slot time: 20000 seconds, Elapsed time: 10 minutes, Shuffle: 100% locally, Joins: 0.

Given the query plan, what is the most likely reason this query is efficient despite processing 10 billion rows?

⚠ Common exam trap

Google Cloud often tests the distinction between partitioning (which reduces scanned rows via pruning) and clustering (which only improves sorting and compression within partitions), leading candidates to mistakenly choose clustering as the primary efficiency driver.

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

✓

The table is partitioned by sale_date.

Partitioning by sale_date enables partition pruning, which allows the query engine to scan only the relevant partitions instead of the entire 10-billion-row table. This drastically reduces the amount of data read and processed, making the query efficient even with a large total row count.

Answer analysis

Option-by-option breakdown

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

  • ✗

    The query uses a wildcard function.

    Why it's wrong here

    A wildcard function expands patterns at runtime and does not reduce the volume of data read; the plan still processes 10 billion rows, so the wildcard cannot explain the efficiency. Wildcards are tempting because they simplify query syntax, but they are a convenience feature, not a scan-reduction mechanism.

  • ✓

    The table is partitioned by sale_date.

    Why this is correct

    Partitioning by sale_date lets the engine prune irrelevant partitions, scanning only the date range the query filters on rather than all 10 billion rows. This partition elimination satisfies the stem's efficiency constraint, since the plan shows reduced data processed despite the table's enormous total size.

  • ✗

    The table is materialized.

    Why it's wrong here

    Materialisation stores precomputed results, so the plan would show a scan of a smaller materialised table rather than processing 10 billion base rows; it does not explain efficiency at that row count. It is tempting because materialised views genuinely accelerate repeated aggregate queries, and would be correct if the stem described a recurring dashboard query against precomputed data.

  • ✗

    The table is clustered by product_id.

    Why it's wrong here

    Clustering by product_id only prunes blocks when the query filters or aggregates on product_id; if the plan shows a full 10-billion-row scan, clustering is not delivering the efficiency. Clustering is tempting because it genuinely reduces bytes scanned for selective filters on the clustered column, which is a different query shape.

About these practice questions

One of 747 original PDE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.