Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22238

PK/FK selectivity estimation underscales estimations

    XMLWordPrintableJSON

Details

    Description

      at this point the parent operators rownum is scaled according to pkfkselectivity

      however pkfkselectivity is computed on a whole subtree.

      Scaling it by that amount will count in estimation already used when parentstats was calculated...so depending on the number of upstream joins - this may lead to severe underestimations

      what happened was:

      • optimization was able to push the filter to the other side of the join
      • as a result the incoming data was already filtered
      • scaling down by the PK selectiviy - was actually already there...but a new "scaling" happened

      Attachments

        1. HIVE-22238.01.patch
          1.0 kB
          Zoltan Haindrich
        2. HIVE-22238.02.patch
          2 kB
          Zoltan Haindrich
        3. HIVE-22238.03.patch
          1.42 MB
          Zoltan Haindrich
        4. HIVE-22238.04.patch
          1.42 MB
          Zoltan Haindrich
        5. HIVE-22238.05.patch
          1.48 MB
          Zoltan Haindrich
        6. HIVE-22238.05.patch
          1.48 MB
          Zoltan Haindrich
        7. HIVE-22238.05.patch
          1.48 MB
          Zoltan Haindrich
        8. HIVE-22238.05.patch
          1.48 MB
          Zoltan Haindrich
        9. HIVE-22238.05.patch
          1.48 MB
          Zoltan Haindrich
        10. HIVE-22238.06.patch
          1.48 MB
          Zoltan Haindrich
        11. HIVE-22238.06.patch
          1.48 MB
          Zoltan Haindrich
        12. HIVE-22238.07.patch
          1.48 MB
          Zoltan Haindrich
        13. HIVE-22238.09.patch
          1.54 MB
          Zoltan Haindrich
        14. HIVE-22238.10.patch
          1.54 MB
          Zoltan Haindrich
        15. HIVE-22238.10.patch
          1.54 MB
          Zoltan Haindrich
        16. HIVE-22238.10.patch
          1.54 MB
          Zoltan Haindrich
        17. HIVE-22238.10.patch
          1.54 MB
          Zoltan Haindrich

        Issue Links

          Activity

            People

              kgyrtkirk Zoltan Haindrich
              kgyrtkirk Zoltan Haindrich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m