Question 331 of 500
Building and testing applicationsmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is to create a secondary index on the 'Status' column. This is the most effective action because Cloud Spanner secondary indexes reduce read latency by allowing the database to perform a targeted lookup instead of a full table scan across millions of rows. Without an index on a non-key column like Status, Spanner must scan every row in the primary key order of CustomerID and OrderDate to find matches, which causes high latency. On the Google Professional Cloud Developer exam, this scenario tests your understanding of how Spanner’s distributed architecture handles query performance—specifically that secondary indexes act as separate sorted tables, enabling fast point lookups without significantly increasing storage costs. A common trap is choosing to add the Status column to the primary key, which would require table redesign and increase write overhead. Memory tip: think of a secondary index as a shortcut—it gives Spanner a direct map to the rows you need, bypassing the long hallway of the primary key scan.

PCD Building and testing applications Practice Question

This PCD practice question tests your understanding of building and testing applications. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. 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 team is using Cloud Spanner for a global application. They notice that read latency is high for queries that filter on a non-key column. The table has a primary key of (CustomerID, OrderDate) and there are millions of rows. The query uses a WHERE clause on the 'Status' column. The team wants to reduce latency without significantly increasing storage costs. What is the most effective action?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "primary"

    Why it matters: Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.

Question 1mediummultiple 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 secondary index on the 'Status' column.

Creating a secondary index on the 'Status' column (Option B) allows Cloud Spanner to directly locate rows matching the filter without scanning the entire table. This reduces read latency because Spanner can use the index to perform a point lookup or small range scan instead of a full table scan. Indexes in Spanner are stored as separate tables, but they add minimal storage overhead compared to the latency improvement they provide.

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.

  • Create an interleaved table for 'Status' values.

    Why it's wrong here

    Interleaved tables are for parent-child relationships, not for indexing a column.

  • Create a secondary index on the 'Status' column.

    Why this is correct

    A secondary index enables index scans on 'Status', drastically reducing read latency.

    Clue confirmation

    The clue word "primary" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Increase the number of nodes in the Spanner instance.

    Why it's wrong here

    More nodes increase throughput but do not fix the lack of an index for filtering.

  • Use stale reads with a 15-second staleness.

    Why it's wrong here

    Stale reads can reduce latency but may return outdated data; it does not address the underlying scan issue.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Cisco often tests the misconception that scaling nodes or using stale reads can fix query performance issues caused by missing indexes, but the correct solution is always to optimize the data access pattern with an appropriate index.

Detailed technical explanation

How to think about this question

Under the hood, Cloud Spanner secondary indexes are stored as separate tables with the indexed column as the primary key, allowing efficient lookups. When a query filters on 'Status', Spanner can use the index to retrieve only the relevant primary keys and then fetch the full rows via a join, avoiding a full table scan. In a real-world scenario, a global e-commerce application with millions of orders might filter by 'Status' (e.g., 'Shipped'), and without an index, each query would scan all rows across all splits, causing high latency; the index reduces this to a targeted scan of only the matching rows.

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

A startup's cloud architect reviews their monthly bill and notices costs are higher than expected for a long-running batch job. Switching from on-demand instances to Reserved Instances — or using Spot/Preemptible VMs — can reduce compute costs by up to 72 %. Questions like this test whether you understand the tradeoffs between commitment, flexibility, and cost across cloud pricing models.

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 PCD 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 PCD 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 PCD question test?

Building and testing applications — This question tests Building and testing applications — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Create a secondary index on the 'Status' column. — Creating a secondary index on the 'Status' column (Option B) allows Cloud Spanner to directly locate rows matching the filter without scanning the entire table. This reduces read latency because Spanner can use the index to perform a point lookup or small range scan instead of a full table scan. Indexes in Spanner are stored as separate tables, but they add minimal storage overhead compared to the latency improvement they provide.

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

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

Are there clue words in this question I should notice?

Yes — watch for: "primary". Asks for the main purpose or function, not a secondary benefit. Eliminate answers that describe side-effects or partial functions.

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

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 PCD 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 PCD exam.