CE estimate is not necessarily authoritative when sample size >= collection size anymore

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Minor Change
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      makeScaledEstimate() in sampling_estimator_impl.cpp returns `EstimationSource::Code` for ceSource if the sample size is >= the collection size, making the assumption that that means the sample covers the whole collection and that the cardinality estimate is therefore exact (authoritative). Now that we have persistent samples, this may no longer be the case as the collection may have changed since the sample was collected. We should return `EstimationSource::Sampling` in this case when featureFlagPersistentStats is enabled

            Assignee:
            Sidarth Krishna
            Reporter:
            Natalie Hill
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: