QuestionQ18

VerifiedDesign scalable and highly available cloud database solutions

Your company runs a globally available, mission-critical inventory-management system on Cloud Spanner. After loading stock keeping unit (SKU) and product-catalog data from a company acquisition, you observed hotspots in the Cloud Spanner database. You want to apply Google-recommended schema-design practices to prevent performance degradation. What should you do?

Choose two
Explanation

Cloud Spanner distributes data and write load by primary-key ranges. Putting a high-cardinality attribute first in a composite primary key helps distribute writes across more key ranges, whereas a low-cardinality leading attribute can concentrate them. Bit-reversed sequential primary-key values are distributed evenly across the key space, avoiding the hotspot behavior caused by monotonic auto-incrementing values.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!