Fix winning plan selected by CBR not having CBR estimates in the output

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • ALL
    • Hide
      db.adminCommand({setParameter:1, featureFlagCostBasedRanker: true, internalQueryCBRCEMode: "automaticCE", automaticCEPlanRankingStrategy: "CBRForNoMultiplanningResults"})
      db.a.drop()
      db.a.createIndexes([{a:1}, {b:1}])
      void db.a.insertMany(Array(10000).fill({a: 0, b: 0}))
       db.a.explain().find({a:0, b:0, c:0})
      
      Show
      db.adminCommand({setParameter:1, featureFlagCostBasedRanker: true , internalQueryCBRCEMode: "automaticCE" , automaticCEPlanRankingStrategy: "CBRForNoMultiplanningResults" }) db.a.drop() db.a.createIndexes([{a:1}, {b:1}]) void db.a.insertMany(Array(10000).fill({a: 0, b: 0})) db.a.explain().find({a:0, b:0, c:0})
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-117635 modified the CBR fallback strategies to resume execution from the initial MP runs if we fall back to CBR. In this case, the estimates map returned by CBR does not match the QuerySolutionNode-s present in the explin data from MP, as CBR internally re-enumerates plans. This causes the winning plan not to have any CBR data in the explain output, even if it was ultimately chosen by CBR.

            Assignee:
            Carlos Alonso Pérez
            Reporter:
            Kartal Kaan Bozdogan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: