ExportXMLWordPrintableJSON

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

      In the detailed join explain output, change each ndvEstimates entry to:

      {
        ndvs: [ { nss: 'shop.suppliers', ndv: 3, ndvSource: 'Sampling' } ],
        joinPredicateSelectivity: 0.3333333333333333
      }
      
      • ndvs lists the NDV estimate of every side that was estimated: the smaller collection's side always, and the other side when it is available without sampling (unique index or persisted NDV statistics). It replaces assumedPkSide/ndv/ndvSource, which only show the larger of the two.
      • Rename selectivity to joinPredicateSelectivity (= 1 / max(ndv)).

      joinPredicateSel in cardinality_estimator.cpp already computes both sides; JoinEdgeSelectivityEstimate needs to keep them and JoinExtraEstimateInfo::serialize needs to output them.

            Assignee:
            Max Verbinnen
            Reporter:
            Max Verbinnen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: