Courseiva
Question 1,376 of 1,446

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

An engineer is designing a Cloud Spanner table for a global user activity tracking system with high write throughput. Which primary key design is BEST to avoid 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

UUID string (generated by application)

Using a UUID or hash-prefixed key distributes writes evenly across nodes, preventing hotspots that occur with monotonically increasing keys.

Answer analysis

Option-by-option breakdown

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

  • Monotonically increasing integer (INT64) with auto-increment

    Why it's wrong here

    Monotonically increasing keys cause write hotspots on the last tablet.

  • Composite key with user_id as first part

    Why it's wrong here

    If user_id is sequential, it may still cause hotspots; UUID is better.

  • UUID string (generated by application)

    Why this is correct

    UUIDs are randomly distributed, avoiding write hotspots.

  • Timestamp as primary key

    Why it's wrong here

    Timestamps are monotonically increasing, causing 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 →

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.