EXPRESS_IXSCAN, COUNT_SCAN not estimated and costed

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Query Planning
    • None
    • Query Optimization
    • QO 2024-12-23
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Those types of plans do not have any costs attached to them

      coll = db.foo;
      coll.drop();for (let i = 0; i < 1000; i++) {
           coll.insertMany([{a: i}]);
      }
      
      db.runCommand({analyze: "foo", key: "_id"});
      // EXPRESS_SCAN query
      db.foo.aggregate([{$match:{_id: 1}}]).explain().queryPlanner;
      // COUNT_SCAN query
      coll.explain().aggregate([{$match: {a: 2}}, {$count: "count"}]);

            Assignee:
            Timour Katchaounov
            Reporter:
            Philip Stoev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: