Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-903

Some left outer join cases are not optimized as the broadcast join.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      The next query has three small tables and expected broadcast join, but not.

      select count(*) from large1 
      left outer join large2 on large1_id = large2_id
      left outer join small1 on large1_id = small1_id
      left outer join small2 on large1_id = small2_id
      left outer join small3 on large1_id = small3_id
      

      The next is the upper query's plan.

      |-eb_1404411535695_0000_000011
         |-eb_1404411535695_0000_000010
            |-eb_1404411535695_0000_000009 (join)
               |-eb_1404411535695_0000_000008 (small)
               |-eb_1404411535695_0000_000007 (join)
                  |-eb_1404411535695_0000_000006 (small)
                  |-eb_1404411535695_0000_000005 (join)
                     |-eb_1404411535695_0000_000004 (small)
                     |-eb_1404411535695_0000_000003 (join)
                        |-eb_1404411535695_0000_000002 (large)
                        |-eb_1404411535695_0000_000001 (large)
      

      Optimized plan should be the next.

      |-eb_1404411906426_0000_000005
         |-eb_1404411906426_0000_000004
            |-eb_1404411906426_0000_000003 (broadcast small1, small2, small3)
               |-eb_1404411906426_0000_000002 (large)
               |-eb_1404411906426_0000_000001 (large)
      

        Attachments

          Activity

            People

            • Assignee:
              hjkim Hyoungjun Kim
              Reporter:
              hjkim Hyoungjun Kim
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: