Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50897

Fix Sort/Limit/Sort Optimization

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.8.0
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • v4.7, v4.4
    • 7

      A Fix for BF-18611. The gist here is that we need to be more careful when coalescing adjacent sorts. We can't simply optimize away the leading sort. We need to check if there is a limit stage in-between the adjacent sorts before deciding to optimize. If the sort key patterns are the same, then we can optimize the leading sort away, otherwise it's incorrect to merge the two sorts and take the min of a current limit and an adjacent limit.

            Assignee:
            eric.cox@mongodb.com Eric Cox (Inactive)
            Reporter:
            eric.cox@mongodb.com Eric Cox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: