Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-8779

$all now choose optimal condition not the first one

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.0
    • Server
    • None
    • 0.5
    • KANBAN BUCKET
    • true

    Description

      https://docs.mongodb.com/manual/reference/operator/query/all/#performance

      Queries that use the $all operator must scan all the documents that match the first element in the $all expression. As a result, even with an index to support the query, the operation may be long running, particularly when the first element in the $all expression is not very selective.

      With SERVER-16042 fixed I think it's not the case anymore

      Attachments

        Issue Links

          Activity

            People

              steve.renaker@mongodb.com Steve Renaker (Inactive)
              yaoxing.zhang@mongodb.com Yaoxing Zhang
              Jess Mokrzecki Jess Mokrzecki
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                6 years, 14 weeks ago