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

Running query on small collection with samlingCE CBR enabled fails

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

      > db.adminCommand({setParameter: 1, planRankerMode: "samplingCE"})
      > db.coll.find({a: 5})
      
      MongoServerError: Sample size cannot be larger than collection cardinality. The sample size can be reduced by choosing a larger margin of error.

      With the default sampling knobs, this error is occur for any collection smaller than 384 documents. We should consider loosing this assertion or being ok samling the entire collection in this case.

      SERVER-92741 will help us avoid this case too, but this seems useful to do for testing/development purposes.

            Assignee:
            ruoxin.xu@mongodb.com Ruoxin Xu
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: