43. Which of the following statements are true about queries issued against a sharded collection? Check all that apply:
题目选项
- A.Each shard can choose its own winning plan
- B.The explain output will include plan information from every accessed shard
- C.The explain output will include server information for every accessed shard
答案置信度:中
正确答案:A、B、C
解析语言:中文
对分片集合执行 explain 时,mongos 会把查询下发给所有被访问的分片,并把每个被访问分片的服务器信息与其执行计划一起汇总在 shards 字段中返回,所以 A、B 正确。查询计划是在各分片本地独立生成的,每个分片根据自己的本地统计信息选择自己的 winning plan(C 正确),mongos 只负责路由与合并结果,不替分片选计划。