Enforce strict histograms mode when estimating a non-sargable MatchExpression

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

      According to my read of the code that does CE for a MatchExpression, it seems like we could get into a scenario where:

      • the plan is an IXSCAN below a FETCH with a non-sargable filter
      • we estimate the IXSCAN using histograms
      • we estimate the non-sargable filter using heuristics (instead of failing because histograms is "strict")

      We should fail to estimate the plan in this scenario.

            Assignee:
            Unassigned
            Reporter:
            Militsa Sotirova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: