Google Cloud Professional Cloud Database Engineer — Question 9
Your company uses Cloud Spanner for a mission-critical inventory management system that is globally available. You recently loaded stock keeping unit (SKU) and product catalog data from a company acquisition and observed hotspots in the Cloud Spanner database. You want to follow Google-recommended schema design practices to avoid performance degradation. What should you do? (Choose two.)
Answer options
- A. Use an auto-incrementing value as the primary key.
- B. Normalize the data model.
- C. Promote low-cardinality attributes in multi-attribute primary keys.
- D. Promote high-cardinality attributes in multi-attribute primary keys.
- E. Use bit-reverse sequential value as the primary key.
Correct answer: D, E
Explanation
The correct answers are D and E because promoting high-cardinality attributes in multi-attribute primary keys helps to distribute the load evenly across the database, reducing hotspots. Using bit-reverse sequential values as primary keys also aids in achieving a more uniform data distribution. Options A, B, and C do not effectively address the issues of hotspotting in the Cloud Spanner environment.