2014년 12월 28일 일요일

Could you please explain how the sum of the column(Eg:salary) query from table which stores in 10 shard environment?

Consider I am trying to fetch the sum of salary from employee table where data is present in 10 nodes. Which memory is occupied for utilized in node level and which memory is utilized for node level results to aggregate ?



There's some basic docs about how the aggregation pipeline runs in a sharded collection, which you can find at Aggregation Pipeline and Sharded Collections in the MongoDB Manual. The pipeline is divided into a part that runs on each shard that has matching documents and a part that runs in a central location (where depends on the version - what version of MongoDB are you using?). Exactly how the split is optimized changes between releases and isn't documented, but you can see how a particular pipeline was optimized by using explain. I don't fully understand what your question is asking about - please read the documentation and feel free to follow up if you still have questions.


댓글 없음:

댓글 쓰기