Topic 1 Question 15
2 つ選択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?
Use an auto-incrementing value as the primary key.
Normalize the data model.
Promote low-cardinality attributes in multi-attribute primary keys.
Promote high-cardinality attributes in multi-attribute primary keys.
Use bit-reverse sequential value as the primary key.
ユーザの投票
コメント(15)
- 正解だと思う選択肢: CE
CE A and D: WRONG. Anti-pattern Since the question specifically stated the hotspots cause by new SKUs and product catalog data added, so the goal would be:
- The old data keeps distributed without any extra work needed.
- Resolving the new data hot spots problem. It seems to me that SKU and product catalog are already normalized, so further normalize might touch the old data. This means B is out. If the new data already normalized, then it must have some high-cardinality attributes, e.g. SKU_id, and some low-cardinality attributes, e.g. category_id. So I picked low-cardinality attibutes in multi-attribute primary keys as C. I agreed with E as already Google recommended practice. Reference: https://cloud.google.com/spanner/docs/schema-design
👍 3zanhsieh2023/02/12 - 正解だと思う選択肢: DE
Spanner needs high cardinality primary key to avoid hotspotting.
👍 3PrtkKA2023/02/28 - 正解だと思う選択肢: CE
Looks CE is correct for me
👍 2GCP722022/12/23
シャッフルモード