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

[CQF] Better explain for physical rewrite rule

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • QO 2023-05-29

      Currently the rule is displayed under the physicalNodeId and applies to the best plan. We should be displaying rules for rejected plans as well if we track them. For example currently we have:

       

      physicalNodeId: 3, costLimit: {Infinite cost}, rule: SargableToIndex
                  Physical properties:
                      projections: 
                          pa
                          pb
                      distribution: 
                          type: Centralized
                      indexingRequirement: 
                          Index, dedupRID
                  cost: 0.0213882, localCost: 0.0213882, adjustedCE: 18.1659, node: 
                      IndexScan [{'<indexKey> 0': pa, '<indexKey> 1': pb}, scanDefName: c1, indexDefName: index1, interval: {(Const [0 | 0], Const [0 | maxKey]]}]
                          ce: 18.1659
                  rejectedPlans: 
                      cost: 0.453393, localCost: 0.194114, adjustedCE: 18.1659, node: 
                          Filter []
                              ce: 18.1659
                          |   EvalFilter []
                          |   |   FunctionCall [getArraySize] 
      ...

      We should be displaying rules under the best plan (IndexScan) and the rejected one (Filter plan). SargableToIndex applies only to the best node. The filter node rooted plan should be annotated as having an RIDIntersectGroupBy rule

            Assignee:
            chii.huang@mongodb.com Chi-I Huang
            Reporter:
            svilen.mihaylov@mongodb.com Svilen Mihaylov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: