Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-98576

Identify residual predicates which reapply index bounds and ignore them during cardinality estimation

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

      This ticket represents work to create a heuristic solution to the "double counting" problem, which is that the query enumerator will frequently create plans which have a residual predicate on a fetch that reapplies the same predicate specified by the index scan, but must be applied because we cannot fully determine if the predicate matches just from the index key.

      Estimating the selectivity of the filter and naively combining it with the selectivity of the index bounds can result in estimates off by orders of magnitude because they may be heavily correlated.

      As a first attempt to solve this, we can use a heuristic and say that if a filter references a field that has non-fully open index bounds, then we ignore its selectivity.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: