Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2418

Allow group by push-down to a fact table

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1-incubating
    • sql-cmp
    • None

    Description

      Trafodion has a rule that pushes a groupby down over a join when possible, but it will not push the groupby to the left child of a join - it relies on join commutativity. This might have been ok 20 years ago when this was coded (by me...), but it isn't good for some situations today. Example:

      select d.y, count(f.a), sum(f.b)
      from big_fact f join small_dim d on f.x=d.y
      where d.a = 1
      group by d.y
      

      The plan we would like is a hash join with the group by on big_fact as the left child. To do this, we need to remove the heuristic that prevents this form of push-down.

      Attachments

        Issue Links

          Activity

            People

              hzeller Hans Zeller
              hzeller Hans Zeller
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: