-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Consider a query like:
[
{ $lookup: {
from: "b",
...
as: "y"
}},
{ $lookup: {
from: "a",
...
as: "x"
}},
{ $unwind: "$y" },
{ $unwind: "$x" },
]
Recently I asked Claude to generate a query, which actually ended up being near join-eligible but wasn't because of the placement of the $unwinds. I suspect this would be a beneficial rewrite regardless of join-optimization. Example prompt/query in comments.