Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
Query Execution
-
Query 2020-02-10, Query 2020-02-24, Query 2020-03-09, Query 2020-03-23
Description
When there is a finite dependency set, the query system often computes a projection on a BSONObj, returning another BSONObj. In agg, this BSONObj turned into a (lazy) Document, which again copies fields out of the BSON upon individual field access. We could avoid repeating some work if the find() layer produced a Document in these cases instead.
Queries with no finite dependency set will continue to use the "lazy" document behavior.