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

Count commands partially costed by CBR

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

      > 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 Unassigned
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: