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

histogramCE: "encountered interval which is unestimatable" with $exists: false over array, index

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • ALL
    • Hide
      db.foo.drop();
      
      let array_docs = [];
      let array = [];
      for (let i = 0; i < 50; i++) {
          array_docs.push({a: array.slice()});
          array.push(i);
      }
      
      
      db.foo.insertMany(array_docs);
      db.foo.createIndex({a: 1});
      db.foo.runCommand({analyze: "foo", key: "a"});
      db.adminCommand({setParameter: 1, planRankerMode: "histogramCE"});
      db.foo.find({a: {$exists: false}}).count();
      db.foo.find({a: {$exists: false}}).explain().queryPlanner.winningPlan.cardinalityEstimate;
      
      Show
      db.foo.drop(); let array_docs = []; let array = []; for (let i = 0; i < 50; i++) { array_docs.push({a: array.slice()}); array.push(i); } db.foo.insertMany(array_docs); db.foo.createIndex({a: 1}); db.foo.runCommand({analyze: "foo" , key: "a" }); db.adminCommand({setParameter: 1, planRankerMode: "histogramCE" }); db.foo.find({a: {$exists: false }}).count(); db.foo.find({a: {$exists: false }}).explain().queryPlanner.winningPlan.cardinalityEstimate;

      Enterprise test> db.foo.find({a: {$exists: false}}).count();
      MongoServerError[HistogramCEFailure]: encountered interval which is unestimatable: [null, null]
      

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

              Created:
              Updated: