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

Bad join ordering in tpcds query93 with primary constraint defined

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Component/s: Query Planning
    • Labels:
      None
    • Target Version/s:

      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.1.patch
          15 kB
          Vineet Garg
        2. HIVE-20292.2.patch
          15 kB
          Vineet Garg
        3. HIVE-20292.3.patch
          37 kB
          Vineet Garg
        4. HIVE-20292.4.patch
          402 kB
          Vineet Garg
        5. HIVE-20292.5.patch
          392 kB
          Vineet Garg
        6. HIVE-20292.6.patch
          530 kB
          Vineet Garg
        7. HIVE-20292.7.patch
          534 kB
          Vineet Garg

          Issue Links

            Activity

              People

              • Assignee:
                vgarg Vineet Garg
                Reporter:
                vgarg Vineet Garg
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: