I was reviewing past courses/lectures and forgot to mention a discrepancy that I came across between M201 and M103 re sort merge using
find().sort(). I have also reported the issue!
NB: Sort merge and merge sort is used interchangeably.
M201 MongoDB Performance | Chapter 5: Performance on Clusters | Lecture: Performance Considerations in Distributed Systems Part 2:
At 4:15 the Curriculum Engineer states that after each shard performs a local sort, the sort merge will happen on the Primary Shard before sending back the results to the client.
@Sonali_Mamgain/other Curriculum Support Engineers, can we please get absolute clarity on this matter. And as there’s no timestamp on the documentation, it’s uncertain whether it has been updated.
In addition, can you please clarify whether the Mongos or the Primary Shard does the Shard Merge (i.e. when we do a
find() without a sort or other appended cursor methods).