Description
Query72 of TPC-DS on 1TB scale generates wrong join order resulting in increased query execution time. It chooses fact-to-fact table join followed by joins with dimension tables as opposed to doing map-join with dimension tables first and doing the fact-to-fact table join at the last.
Please find attachment for the join order selected by CBO vs rewritten query with expected join order.