Specifies the stream method, which can be broadcast, redistribute, or specifying the distribution key for Agg redistribution.
Specifies the hint for the distribution column druing the Agg process.. This parameter is supported only by clusters of version 8.1.3.100 or later.
1 | [no] broadcast | redistribute(table_list) | redistribute ((*) (columns)) |
1 2 | explain select /*+ no redistribute(store_sales store_returns item store) leading(((store_sales store_returns item store) customer)) */ i_product_name product_name ... |
In the original plan, the join result of store_sales, store_returns, item, and store is redistributed before it is joined with customer. After the hinting, the redistribution is disabled and the join order is retained. The optimized plan is as follows:
1 2 | explain (verbose on, costs off, nodes off) select /*+ redistribute ((*) (2 3)) */ a1, b1, c1, count(c1) from t1 group by a1, b1, c1 having count(c1) > 10 and sum(d1) > 100 |
In the following example, the last two columns of the specified GROUP BY columns are used as distribution keys.
1 2 | explain (verbose on, costs off, nodes off) select /*+ redistribute ((*) (3 1)) */ distinct a1, b1, c1 from t1; |