Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 87 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 87
Topic #: 1
[All Professional Cloud Developer Questions]

You are developing an ecommerce application that stores customer, order, and inventory data as relational tables inside Cloud Spanner. During a recent load test, you discover that Spanner performance is not scaling linearly as expected. Which of the following is the cause?

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
gfr892
Highly Voted 2 years, 10 months ago
C is correct https://cloud.google.com/spanner/docs/schema-and-data-model#choosing_a_primary_key
upvoted 8 times
...
thewalker
Most Recent 4 months, 1 week ago
Selected Answer: C
The most likely cause of the performance issue is C. The use of Version 1 UUIDs as primary keys that increase monotonically. Here's why: Version 1 UUIDs and Monotonicity: Version 1 UUIDs are generated based on timestamps and MAC addresses. When used as primary keys, they can lead to performance issues in Cloud Spanner due to their non-monotonic nature. As new UUIDs are generated, they are not guaranteed to be in a sequential order, which can cause fragmentation in the underlying storage and lead to slower queries.
upvoted 1 times
thewalker
4 months, 1 week ago
Let's analyze why the other options are less likely: A. The use of 64-bit numeric types for 32-bit numbers: While using larger data types than necessary can impact storage space, it's unlikely to significantly affect performance in a way that would cause non-linear scaling. B. The use of the STRING data type for arbitrary-precision values: Using the STRING data type for numeric values can impact performance, but it's not the primary cause of non-linear scaling. Cloud Spanner is optimized for numeric data types. D. The use of LIKE instead of STARTS_WITH keyword for parameterized SQL queries: While using LIKE can be less efficient than STARTS_WITH for certain queries, it's unlikely to cause a significant performance bottleneck that would prevent linear scaling.
upvoted 1 times
...
...
santoshchauhan
8 months, 3 weeks ago
Selected Answer: C
C. The use of Version 1 UUIDs as primary keys that increase monotonically. When designing schemas for Cloud Spanner, it is important to consider how the choice of primary keys can impact performance, especially under heavy load. Cloud Spanner splits data among servers based on the primary key values, so if the keys are monotonically increasing, as is the case with Version 1 UUIDs, new inserts are constantly added to the end of the table. This can create hotspots, where a single node receives a disproportionate amount of read and write requests, leading to performance bottlenecks and preventing linear scaling.
upvoted 1 times
...
__rajan__
1 year, 2 months ago
Selected Answer: C
C is the best option.
upvoted 1 times
...
omermahgoub
1 year, 10 months ago
In Cloud Spanner, the use of Version 1 UUIDs as primary keys that increase monotonically can cause performance issues because they are not evenly distributed. This can lead to hot regions, where a disproportionate number of requests are sent to a specific node or range of nodes, causing those nodes to become overloaded and leading to decreased performance. To improve performance, you should consider using primary keys that are more evenly distributed, such as hash-based keys or random integers.
upvoted 2 times
omermahgoub
1 year, 10 months ago
A, the use of 64-bit numeric types for 32-bit numbers, is not likely to cause performance issues in Cloud Spanner. B, the use of the STRING data type for arbitrary-precision values, is not likely to cause performance issues in Cloud Spanner. D, the use of LIKE instead of STARTS_WITH keyword for parameterized SQL queries, is not likely to cause performance issues in Cloud Spanner.
upvoted 1 times
...
...
zellck
1 year, 11 months ago
Selected Answer: C
C is the answer. https://cloud.google.com/spanner/docs/schema-design#primary-key-prevent-hotspots 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.
upvoted 1 times
...
TNT87
2 years ago
https://cloud.google.com/spanner/docs/schema-design#uuid_primary_key Ans C
upvoted 1 times
...
tomato123
2 years, 3 months ago
Selected Answer: C
C is correct
upvoted 2 times
...
brewpike
2 years, 6 months ago
C - Version 1 is not recommended.
upvoted 2 times
...
morenocasado
2 years, 7 months ago
Selected Answer: C
Community choice is C
upvoted 2 times
...
scaenruy
2 years, 10 months ago
I vote C
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...