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

[CQF] Make union cost commutative

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • None
    • None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • QO 2023-02-06

    Description

      Costing a UnionNode is not a commutative operation. It does not use the CE estimate of the first child, but does use every other child's CE estimate. This operation should be commutative in theory.

      It looks like the total cost should be startupCost plus child.cost + incrementalCost * child.ce for each child.

       

      Also need to handle the special cast of a union node with one child which is used in its capacity to restrict the projections propagated up to the parent.

      Attachments

        Activity

          People

            svilen.mihaylov@mongodb.com Svilen Mihaylov (Inactive)
            matt.boros@mongodb.com Matt Boros
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: