Design innovative, scalable, and highly available cloud database solutions →mediumMultiple ChoiceObjective-mapped
PCDE Practice Question: Design innovative, scalable, and highly available cloud database solutions
A company uses Cloud Spanner for its global inventory system. The current schema has a table 'Orders' with a primary key of OrderID (UUID). The team wants to add a secondary index to support queries filtering by 'status' and 'order_date'. Which type of index should they create and how should they define it to ensure the index covers the query without needing to read the base table?
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 (status) STORING (order_date)
A secondary index with a STORING clause includes additional columns (like order_date) in the index, allowing the index to cover queries that reference only the indexed and stored columns, avoiding a back-join to the base table.
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 a secondary index on (status, order_date)
Why it's wrong here
This is a composite index that can filter on both, but it does not include other columns; the query may still need to read the base table unless all needed columns are in the index.
- ✓
Create a secondary index on (status) STORING (order_date)
Why this is correct
This creates a covering index: the index includes the status column for filtering and stores order_date, so queries on status and order_date can be satisfied by the index alone.
- ✗
Create a global secondary index on status, and let the query join with the base table for order_date
Why it's wrong here
This would require reading the base table after the index lookup, which is less efficient than a covering index.
- ✗
Create a local secondary index on status with order_date stored in the index
Why it's wrong here
Spanner does not have local secondary indexes; all secondary indexes are global.
Go deeper
Related to this question
About these practice questions
One of 1,446 original PCDE 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.