Different plan for query with skip defeats tie breaking heuristics

XMLWordPrintableJSON

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

      With indexes on f1, s and f1, f2, s and query with {f1:5, f2:5, s:{$gt/$lt}} and sort on s introducing skip causes the first index to get picked in case the plans tie.

      Another way to stating the problem is that plan with FETCH with filter for a particular value ties another plan without such filter when intuitively it should either score lower or lose the tie breaker.

            Assignee:
            Unassigned
            Reporter:
            Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: