Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-3588

Regression in TPC-DS Q95 due to change in join order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • Impala 2.6.0
    • None
    • Frontend

    Description

      TPC-DS Q95 regressed by 33% due to flip in join order, the new join order limits where runtime filters can be pushed.

      Query

      with ws_wh as
      (select ws1.ws_order_number --,ws1.ws_warehouse_sk wh1,ws2.ws_warehouse_sk wh2
       from web_sales ws1 left semi join web_sales ws2
       on ws1.ws_order_number = ws2.ws_order_number
       and ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk)
      select
         count(distinct ws_order_number) as order_count
        ,sum(ws_ext_ship_cost) as total_shipping_cost
        ,sum(ws_net_profit) as total_net_profit
      from
         web_sales ws1
        ,date_dim
        ,customer_address
        ,web_site
      where
          d_date between cast('2000-02-01' as timestamp) and cast('2000-02-01' as timestamp) + interval 60 days
      and ws1.ws_ship_date_sk = d_date_sk
      and ws1.ws_ship_addr_sk = ca_address_sk
      and ca_state = 'NE'
      and ws1.ws_web_site_sk = web_site_sk
      and web_company_name = 'pri'
      and ws1.ws_order_number in (select distinct(ws_order_number)
                                  from ws_wh)
      and ws1.ws_order_number in (select distinct(wr_order_number)
                                  from web_returns,ws_wh
                                  where wr_order_number = ws_wh.ws_order_number)
      order by count(distinct ws_order_number)
      limit 100
      

      Attachments

        1. 2.6_Q95.out
          1.11 MB
          Mostafa Mokhtar
        2. 2.5_Q95.out
          1.33 MB
          Mostafa Mokhtar

        Activity

          People

            mmokhtar Mostafa Mokhtar
            mmokhtar Mostafa Mokhtar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: