$lookup
is new in MongoDB 3.2. It performs a left outer join to an unsharded collection in the same database to filter in documents from the “joined” collection for processing.
To use $lookup
, the from
collection cannot be sharded.
On the other hand, sharding is a useful horizontal scaling approach.
What's the best practise to use them together?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…