QuestionQ7

Designing scalable, available, and reliable cloud-native applications

You are building an ecommerce application that stores customer, order, and inventory data in relational tables within Cloud Spanner. A recent load test shows that Spanner performance is not scaling linearly as expected. Which of the following is causing this?

  • A The use of 64-bit numeric types for 32-bit numbers.
  • B The use of the STRING data type for arbitrary-precision values.
  • C The use of Version 1 UUIDs as primary keys that increase monotonically.
  • D The use of LIKE instead of STARTS_WITH keyword for parameterized SQL queries.
Explanation

Cloud Spanner range-shards data by primary key. Version 1 UUIDs contain a timestamp in their high-order bits, causing newly inserted primary-key values to cluster in the same range. The resulting write hotspot overloads a split and limits throughput, so performance does not scale linearly.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!