MongoDB DEV · Question 116 · Multiple choice

In a sharded cluster, which of the following require unique values? Check all that apply:

Answer options

  1. A.
    The index used as the Shard Key
  2. B.
    Any single-field index
  3. C.
    The default index on _id

Answer confidence: High

Correct answer: C

Explanation language: Chinese

分片集群中 _id 的默认索引必须唯一(_id 不是分片键时,唯一性只在各分片内部保证),所以选 C。A 错:作为分片键的那个索引本身不要求唯一,只有显式声明 unique 才是唯一索引;B 错:普通单字段索引可以是普通索引,也可以带 unique/sparse/partial 等不同选项,并非必须唯一。

Papers containing this question

This question appears in 3 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.

AUTHOR · PROJECTS · OPEN SOURCE

Author & MongoDB projects

Building data platforms, MongoDB migration and sync tools, and cloud operations products.

Contact the author for any MongoDB needs.

Contact the author ↗mlhp123@outlook.com

Support the author

If this question bank helps you, optional donations are welcome.

Scan with Alipay to support the authorOpen full-size donation image ↗