Courseiva

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

A retail company is designing a new inventory management system on Cloud Spanner. They need to ensure high write throughput for order processing. Which two schema design practices help avoid write hotspots? (Choose TWO.)

⚠ Common exam trap

Candidates often mistakenly think that secondary indexes or foreign keys improve write throughput in Cloud Spanner, but these features only assist reads or data integrity, not write distribution. The key is to avoid monotonically increasing primary keys and use hash prefixes to distribute writes.

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

Avoid using a monotonically increasing primary key.

Monotonically increasing primary keys (e.g., auto-increment integers or timestamps) cause all new writes to be directed to the same tablet server, creating a hot spot. Cloud Spanner splits data by key range, so sequential keys concentrate load on a single split. Option E is correct because adding a hash prefix to the primary key distributes writes uniformly across splits, preventing any single node from becoming a bottleneck.

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 secondary indexes on frequently queried columns.

    Why it's wrong here

    Secondary indexes affect reads, not write distribution.

  • Avoid using a monotonically increasing primary key.

    Why this is correct

    Monotonically increasing keys cause hotspotting.

  • Store all data in a single table with no interleaving.

    Why it's wrong here

    Interleaving or not does not avoid hotspots.

  • Use foreign keys to enforce referential integrity.

    Why it's wrong here

    Foreign keys do not influence write distribution.

  • Add a hash prefix to the primary key to distribute writes.

    Why this is correct

    Salting prevents hotspotting.

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 →

How Courseiva writes practice questions · Editorial policy

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.