Avoid placing a PROJECTION_COVERED stage on find queries destined for aggregation

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      We should consider trying to bypass some of the work to materialize to BSON then instantiate a Document when going from a covered query in find to an aggregation that consumes the output of this query via a DocumentSourceCursor. Some flame graphs from SERVER-87237 suggested we spend quite a bit of time per document in this code, but in the case of covered queries, we can access alot of the information we need directly from the index and instantiate a Document directly (which could save us time if we need to do Document-friendly things later on in the pipeline).

            Assignee:
            Unassigned
            Reporter:
            Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: