Count commands partially costed by CBR

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.adminCommand({setParameter:1, planRankerMode: "heuristicCE"})
      > db.c.explain().find({a:1}).count()
      
      "winningPlan" : {
        "isCached" : false,
        "stage" : "COUNT",
        "inputStage" : {
          "stage" : "COLLSCAN",
          "costEstimate" : 0.8720823999999999,
          "cardinalityEstimate" : 44.7548880012005,
          "numDocsEstimate" : 2003,
          "estimatesMetadata" : {
            "ceSource" : "Heuristics"
          },
          "filter" : {
            "a" : {
              "$eq" : 1
            }
          },
          "direction" : "forward"
        }
      },

      The collscan is costed by the count stage is not.

              Assignee:
              Unassigned
              Reporter:
              Ben Shteinfeld
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: