
Answer-first summary for fast verification
Answer: The use of Version 1 UUIDs as primary keys that increase monotonically.
The correct answer is **C**. Cloud Spanner distributes data based on primary keys. Using Version 1 UUIDs, which include timestamps and increase monotonically, causes new rows to be written to the same split (hotspotting). This prevents linear scaling as writes are concentrated on a single node, even as the cluster grows. Options A and B relate to data type inefficiencies but do not directly impact scaling. Option D affects query performance but not the underlying distribution of data across nodes.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are developing an ecommerce application that stores customer, order, and inventory data in relational tables within Cloud Spanner. During a recent load test, you observe that Spanner's performance is not scaling linearly as expected. What is the most likely cause of this issue?
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.