-
Type: Bug
-
Resolution: Duplicate
-
Priority: 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.
- duplicates
-
SERVER-99347 Implement a full scan plan for Sampling CE if collection is smaller than the required sample
- Backlog
- related to
-
SERVER-92741 Bypass CBR and do full multi-planning when a collection is small enough
- Backlog