Courseiva
Question 177 of 1,446

PCDE Practice Question: Design innovative, scalable, and highly available cloud database solutions

A team is designing a Spanner schema for an online gaming leaderboard. The leaderboard stores player scores and requires high write throughput. Which primary key design is BEST to avoid write hotspots?

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

Primary key: (HashOfPlayerId, Timestamp)

Monotonically increasing keys (like score or timestamp) cause hotspotting. Using a random prefix (e.g., hash of player ID) ensures writes are distributed across splits. Player ID alone might also cause hotspotting if many players write simultaneously.

Answer analysis

Option-by-option breakdown

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

  • Primary key: (HashOfPlayerId, Timestamp)

    Why this is correct

    Hash prefix distributes writes evenly. Timestamp as second part allows ordering.

  • Primary key: (PlayerId, Timestamp)

    Why it's wrong here

    PlayerId alone may still cause hotspotting if many players are active simultaneously.

  • Primary key: (Score, PlayerId)

    Why it's wrong here

    Score is monotonically increasing, causing writes to concentrate on a single split.

  • Primary key: (Timestamp, PlayerId)

    Why it's wrong here

    Timestamp leads to hotspotting as all writes happen at increasing times.

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: Jul 4, 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 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.