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

Bad join ordering in tpcds query93 with primary constraint defined

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • Query Planning
    • None

    Description

      Query 93 has join (including outer) b/w store_sales, store_return and reason. Without constraints store_return is joined with reason and then with store_sales.
      But if a primary key is added on store_return (alter table store_returns add constraint tpcds_pk_sr primary key (sr_item_sk, sr_ticket_number) disable novalidate rely) join order becomes ((store_sales, store_return), reason) which is very inefficient.

      Attachments

        1. HIVE-20292.7.patch
          534 kB
          Vineet Garg
        2. HIVE-20292.6.patch
          530 kB
          Vineet Garg
        3. HIVE-20292.5.patch
          392 kB
          Vineet Garg
        4. HIVE-20292.4.patch
          402 kB
          Vineet Garg
        5. HIVE-20292.3.patch
          37 kB
          Vineet Garg
        6. HIVE-20292.2.patch
          15 kB
          Vineet Garg
        7. HIVE-20292.1.patch
          15 kB
          Vineet Garg

        Issue Links

          Activity

            People

              vgarg Vineet Garg
              vgarg Vineet Garg
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: