Join optimization: cost estimate for FETCH is incorrect

XMLWordPrintableJSON

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

      The cost estimate for FETCH seems to be identical to the input cardinality plus some small constant. This is totally out of line compared to all the other estimates:

                  stage: 'FETCH',
                  planNodeId: 3,
                  costEstimate: 1000.1999999999999,
                  cardinalityEstimate: 1000,
                  estimatesMetadata: { ceSource: 'Code' }, 

      The same operator has a correct estimate in CBR. The equivalent COLLSCAN also has a reasonable estimate:

                {
                  stage: 'COLLSCAN',
                  planNodeId: 2,
                  costEstimate: 0.36249999999999993,
                  cardinalityEstimate: 1000,
      

            Assignee:
            Ben Shteinfeld
            Reporter:
            Philip Stoev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: