Design innovative, scalable, and highly available cloud database solutions →hardMultiple SelectObjective-mapped
PCDE Practice Question: Design innovative, scalable, and highly available cloud database solutions
A gaming company is designing a leaderboard using Cloud Spanner. The leaderboard updates scores in real time and supports queries for top players. Which THREE strategies should they implement to achieve high performance and avoid hotspots? (Choose 3)
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 global secondary indexes with STORING clause to avoid back-to-base lookups
Salting distributes writes, storing top scores in a separate table reduces contention, and using a STORING clause in indexes prevents data lookup. Global secondary indexes without STORING cause extra round trips.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use global secondary indexes with STORING clause to avoid back-to-base lookups
Why this is correct
Improves read performance for leaderboard queries.
- ✗
Use a monotonically increasing primary key for scores
Why it's wrong here
This creates hotspots.
- ✗
Use a single table with all data and rely on Spanner auto-scaling
Why it's wrong here
Auto-scaling does not prevent hotspotting from monotonically increasing keys.
- ✓
Maintain a separate table for top scores and update it asynchronously
Why this is correct
Reduces write contention on the main leaderboard.
- ✓
Add a hash prefix to the primary key to distribute writes
Why this is correct
Salting avoids hotspotting.
Go deeper
Related to this question
About these practice questions
This PCDE question is part of Courseiva's 1,446-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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. A company is building a real-time leaderboard for a mobile game using Google Cloud. The data includes player scores that update frequently (thousands of writes per second) and queries for top 100 players. Which database is most suitable?
easy- A.BigQuery
- ✓ B.Cloud Bigtable
- C.Cloud Firestore
- D.Cloud SQL (PostgreSQL)
Why B: Cloud Bigtable is a good fit for high write throughput and simple range scans (e.g., scanning top scores). Firestore has limited write capacity. Cloud SQL cannot handle thousands of writes per second. Spanner can but is overkill and more expensive.
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.