55. Given the following query: find({"genre": "action"}).sort({"year": 1}).skip(100).limit(20) Which of the following steps would be executed by the mongos process, not by the mongod processes on each shard? Choose the best answer:
题目选项
- A.Looking for documents that have a field genre with value action
- B.Performing a skip operation of 100 documents
- C.Sorting the result set in memory, without an index
- D.Applying a limit of 120 documents
- E.Walking an index to fetch the documents
答案置信度:中
正确答案:C
解析语言:中文
查询被下发到相关分片后,过滤(A)与走索引取文档(E)由各分片完成,limit 结果上限(D 中的 120 = 100+20)也会下推到分片;而把各分片返回的有序结果在内存里做归并排序、且没有可用的单一索引,只能由 mongos 承担,因此选 C。