Consult persisted NDV statistics in estimateNDV()

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Read path: serve persisted NDV statistics instead of Method-of-Moments when available.

      • Loader mirroring PersistentSampleLoader::tryLoad: construct the deterministic _id, DBDirectClient::findOne on system.stats.ndv with no projection (keeps the query express-eligible)
      • Only use persisted stats when eligible (feature flag + knob + single field only for now + no bounds passed)
      • Clamp the served estimate to current collection cardinality (reuse the existing clamp)

            Assignee:
            Aaron Schüttpelz
            Reporter:
            Max Verbinnen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: