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

Handle all leaf match expression in Heuristic CE

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • QO 2024-12-23, QO 2025-01-06, QO 2025-01-20

      coll = db.foo;
      coll.drop();
      
      for (let i = 0; i < 1000; i++) {
           coll.insertMany([{a: i,b:1}]);
      }
      
      db.runCommand({analyze: "foo", key: "a"});
      
      db.adminCommand({setParameter: 1, planRankerMode: "heuristicCE"});
      db.foo.aggregate([{$match:{a: {$size: 1}}}]).explain();
      
      MongoServerError[Location9608701]: invalid MatchExpression passed to heuristic estimate: 4
      
      

      histogramCE` produces the same error message

            Assignee:
            timour.katchaounov@mongodb.com Timour Katchaounov
            Reporter:
            philip.stoev@mongodb.com Philip Stoev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: