3. Which of the following statements are always true about shard keys? Check all that apply:
题目选项
- A.Shard keys are permanent: the selected shard key cannot be changed after sharding
- B.Shard keys must be supported by an index
- C.Shard key values must be unique: the shard key value in every document in the sharded collection must be unique
答案置信度:高
正确答案:A、B
解析语言:中文
在 4.4/考试语境中分片键一经分片就不可更改(5.0 起才可通过 reshardCollection 重分片或 refineCollectionShardKey 微调),A 是考点;分片键必须有一个以它为前缀的索引支撑,创建分片集合时 MongoDB 会自动建立(C)。B 错:分片键值不要求唯一,唯一性只由 _id 保证。