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

reorder $limit before $lookup in pipeline

    XMLWordPrintable

    Details

      Description

      In pipeline:

      [ ... {$lookup:{}}, {$addFields:{}}, {$lookup:{}}, {$limit:10}, ... ]
      

      moving $limit before the first $lookup stage will significantly reduce the amount of work that lookup and addFields have to do. We currently don't reorder $limit with $lookup, it appears.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated: