$last/$first window functions repeat evaluation for every document in a static window

XMLWordPrintableJSON

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

      The executors for $last/$first do not cache results, even if the window is static ([unbounded, unbounded]). This means that we will evaluate the same expression against the same document for every document in the window.

      Without partitioning it's probably not an interesting case, but I could imagine a query such as "give me the last measurement per device" would be impacted by this.

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: