Google Cloud Professional Cloud Developer Practice Test

Question: 1 / 400

When stored data in Cloud Spanner performs poorly under load, which data configuration issue can cause this problem?

Using 64-bit numeric types for 32-bit numbers.

Using VARCHAR for large text fields.

Using Version 1 UUIDs as primary keys that increase monotonically.

The correct answer highlights a crucial aspect of database performance in Cloud Spanner, specifically related to primary key selection. When using Version 1 UUIDs, which increase monotonically, all writes are directed to the same partition in the database. This can lead to hotspotting, where a significant amount of load is concentrated on a single node or partition rather than being distributed evenly across the system. This can severely degrade performance under load, especially when there are high write operations, as the database struggles to handle requests effectively.

In contrast, optimal primary key designs typically aim for randomness or distribution to provide balanced access across partitions. This randomness helps prevent bottlenecks and ensures that the load is spread across multiple nodes, preserving performance during peak usage times.

The other options present various concerns but do not directly lead to load performance issues caused by partitioning and distribution. Therefore, the use of monotonically increasing UUIDs as primary keys is particularly problematic for performance in a horizontally scalable database like Cloud Spanner.

Get further explanation with Examzify DeepDiveBeta

Using LIKE for filtering instead of indexed columns.

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy