nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #223

You need to create a new transaction table in Cloud Spanner that stores product sales data. You are deciding what to use as a primary key. From a performance perspective, which strategy should you…

The correct answer is C. A random universally unique identifier number (version 4 UUID). Explanation/Reference: https://cloud.google.com/spanner/docs/schema-and-data-model#choosing_a_primary_key

Submitted by minji_kr· Mar 30, 2026Designing data processing systems

Question

You need to create a new transaction table in Cloud Spanner that stores product sales data. You are deciding what to use as a primary key. From a performance perspective, which strategy should you choose?

Options

  • AThe current epoch time
  • BA concatenation of the product name and the current epoch time
  • CA random universally unique identifier number (version 4 UUID)
  • DThe original order identification number from the sales system, which is a monotonically increasing integer

How the community answered

(14 responses)
  • A
    7% (1)
  • C
    86% (12)
  • D
    7% (1)

Explanation

Explanation/Reference: https://cloud.google.com/spanner/docs/schema-and-data-model#choosing_a_primary_key

Topics

#Cloud Spanner#primary key design#hotspot avoidance#UUID

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice