Files
doc-exports/docs/opengauss/umn/opengauss_opti_0058.html
Ru, Li Yi 0b0c254b4c gaussdb_umn_1128
Reviewed-by: Wagner, Fabian <fabian.wagner@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2025-01-13 14:51:57 +00:00

3.2 KiB

Stream Operation Hints

Description

These hints specify a stream operation, which can be broadcast or redistribute.

Syntax

[no] broadcast|redistribute(table_list)

Parameter Description

  • no specifies that the specified hint will not be used for a stream operation.
  • table_list indicates tables to be joined for a stream operation. For details, see Parameter description.

Example

Hint the query plan in Example as follows:

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:

<script language="JavaScript"> </script>