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

Enable sampling CE in cbr_infrastructure.js

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

      This was attempted in SERVER-97864 (snapshot of testcase changes here) but failed for a few reasons, and pushed into this follow-up ticket.

      1. 0-sample estimates led to an assertion failure in the test. This was fixed by modifying the test so samples never returned 0. A more robust solution will be done later.
      2. The assertion that docsExamined is always less for CBR plans is not always true. We countered cases where classic chose a index skip scan (what we called "recursive index navigation" in bonsai), while CBR choose an index with a contiguous range. Classic results in more seeks and more works, but fewer docs examined. So we removed this assertion from the test.
      3. The attached repro-cbr.js shows a case where CBR overestimates the number of keys in a index skip scan plan. This results in CBR choosing a plan with more works than the classic plan. But we are unsure whether classic's plan is actually better. We need to investigate this case before we can submit this test.

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

              Created:
              Updated: