Use empty array counter for CE for PathArr in SargableNode

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • QO 2022-10-17
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When estimating an $elemMatch predicate, the requirements map of a Sargable node may include a special 'PathArr' predicate that signals we should estimate this field using $elemMatch semantics. This predicate may be split out into its own SargableNode during the MemoExploration phase.

      When this happens, we need a special case in order to get a correct estimate when we see a Sargable node with just a requirements map entry like PathGet "a" PathIdentity [array interval]. We should use a counter of empty arrays in statistics to obtain a reasonable estimate for the proportion of arrays we expect in the output of the SargableNode.

            Assignee:
            Timour Katchaounov
            Reporter:
            Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: