MongoDB DBA · Question 324 · Multiple choice

43. Which of the following statements are true about queries issued against a sharded collection? Check all that apply:

Answer options

  1. A.
    Each shard can choose its own winning plan
  2. B.
    The explain output will include plan information from every accessed shard
  3. C.
    The explain output will include server information for every accessed shard

Answer confidence: Medium

Correct answer: A, B, C

Explanation language: Chinese

对分片集合执行 explain 时,mongos 会把查询下发给所有被访问的分片,并把每个被访问分片的服务器信息与其执行计划一起汇总在 shards 字段中返回,所以 A、B 正确。查询计划是在各分片本地独立生成的,每个分片根据自己的本地统计信息选择自己的 winning plan(C 正确),mongos 只负责路由与合并结果,不替分片选计划。

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 ↗