Google
ASSOCIATE-CLOUD-ENGINEER · Question #123
Your customer has implemented a solution that uses Cloud Spanner and notices some read latency-related performance issues on one table. This table is accessed only by their users using a primary key.
The correct answer is C. Change the primary key to not have monotonically increasing values.. Schema design best practice #1: Do not choose a column whose value monotonically increases or decreases as the first key part for a high write rate table. https://cloud.google.com/spanner/docs/schema-design#postgresql
Submitted by salim_om· Mar 30, 2026Ensuring successful operation of a cloud solution
Question
Your customer has implemented a solution that uses Cloud Spanner and notices some read latency-related performance issues on one table. This table is accessed only by their users using a primary key. The table schema is shown below. You want to resolve the issue. What should you do?
Exhibits
Options
- ARemove the profile_picture field from the table.
- BAdd a secondary index on the person_id column.
- CChange the primary key to not have monotonically increasing values.
- DCreate a secondary index using the following Data Definition Language (DDL):
How the community answered
(19 responses)- A5% (1)
- B21% (4)
- C58% (11)
- D16% (3)
Explanation
Schema design best practice #1: Do not choose a column whose value monotonically increases or decreases as the first key part for a high write rate table. https://cloud.google.com/spanner/docs/schema-design#postgresql
Topics
#Cloud Spanner#primary key design#hotspot#read latency
Community Discussion
No community discussion yet for this question.

