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

IndexBoundsBuilder::translateEquality never needs to sort the entire output

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Optimization
    • Fully Compatible

    Description

      In the case an array element added to an interval list, the code sorts the entire output interval list. This sort is redundant for $in since a sort will eventually be done as part of unionize. translateEquality only needs to be concerned with the two elements it is adding and should just place them on the end of the list in order. If it does so it will also be correct for $eq since the two elements will be the only ones in the output list.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            jacob.evans@mongodb.com Jacob Evans
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: