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

Estimate FilterNode with mixed sargable and non-sargable AND/OR children

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization

      In the general case, there may exist FilterNodes that are not sargable as a whole, but have individual AND/OR children that are sargable.

      For instance, fiven the expression (a > 5 OR b < 10) AND (c = 33) AND (d regex 'acme.*corp'), the first term is a disjunction that is non sargable (until SERVER-69026 is done), but each of the individual comparison predicates {>, <, =} are sargable. So most of this expression can be estimated via histograms if they are available.

      This task makes sure that each individual child is evaluated via a histogram whenever possible. The task also adds tests for various combinations of sargable/non-sargable nodes.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            timour.katchaounov@mongodb.com Timour Katchaounov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: