Question 446 of 1,446
Design innovative, scalable, and highly available cloud database solutions →hardMultiple SelectObjective-mapped
PCDE Secondary index Practice Question
A company is designing a Cloud Spanner database for a global supply chain application. The schema includes a table 'Shipments' with columns: shipment_id (INT64), created_at (TIMESTAMP), origin (STRING), destination (STRING), status (STRING). The application frequently queries for shipments by origin and status. Which three design choices optimize query performance? (Choose THREE.)
⚠ Common exam trap
Google Cloud often tests the misconception that Cloud Spanner supports traditional partitioning or that monotonically increasing keys are safe for distributed databases, leading candidates to select options that would actually degrade performance.
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
✓
Use the STORING clause in the index to include frequently accessed columns.
The STORING clause in a Cloud Spanner secondary index allows you to include additional columns (such as 'destination' or 'status') in the index storage, enabling index-only scans that avoid fetching rows from the base table. This reduces read latency and resource consumption for queries that frequently access those columns along with the indexed keys. Option C is correct because interleaving an 'OrderItems' table under 'Shipments' places child rows physically close to parent rows, improving join performance by reducing round trips and allowing efficient row scans. Option D is correct because a secondary index on (origin, status) directly supports the frequent queries filtering on those columns, enabling fast lookups without scanning the entire table. Options A and E are incorrect: Cloud Spanner does not support traditional partitioning by region, and monotonically increasing primary keys cause hotspotting at the leader, reducing write throughput.
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 region to limit scans.
Why it's wrong here
Spanner does not support user-defined partitioning.
- ✓
Use the STORING clause in the index to include frequently accessed columns.
Why this is correct
Reduces additional reads.
- ✓
Interleave an 'OrderItems' table under 'Shipments' for join performance.
Why this is correct
Interleaving improves read locality.
- ✓
Create a secondary index on (origin, status) for efficient filtering.
Why this is correct
Index speeds up queries.
- ✗
Use a monotonically increasing integer primary key for high write throughput.
Why it's wrong here
Causes hotspots.
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 →
Same concept, more angles
1 more way 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. You are designing a Spanner schema for a financial application that stores transactions for user accounts. To avoid hotspots and optimize performance, which TWO practices should you follow?
medium- A.Store all data in a single table without interleaving.
- ✓ B.Use the STORING clause in secondary indexes to include frequently accessed columns.
- ✓ C.Use a UUID as the primary key.
- D.Use a monotonically increasing integer as the primary key.
- E.Create secondary indexes without the STORING clause.
Why B: The STORING clause in a Spanner secondary index allows you to include non-key columns directly in the index, enabling index-only scans that avoid a back-join to the base table. This reduces read latency and resource consumption, which is critical for high-throughput financial transaction queries.
Last reviewed: Jul 4, 2026
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.
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.
Sign in to join the discussion.