nerdexam
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

ASSOCIATE-CLOUD-ENGINEER question #123 exhibit 1
ASSOCIATE-CLOUD-ENGINEER question #123 exhibit 2

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)
  • A
    5% (1)
  • B
    21% (4)
  • C
    58% (11)
  • D
    16% (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.

Full ASSOCIATE-CLOUD-ENGINEER Practice