Updated on 2026-11-06 GMT+08:00

Hints for UDF Fusion

Function

When sql_opt_options='on(udf_fusion)' is set, the UDF fusion optimization is enabled. Nested UDFs can be fused into one. When a UDF has multiple UDFs as inputs, only one of them can be selected for fusion. You can use hints to specify two UDFs to be fused or specify a UDF that does not participate in fusion.

Syntax

1
[no] udffusion(udf_name udf_name)

Parameter Description

  • no: indicates that the UDF corresponding to the hint cannot be merged. If multiple UDFs are specified in the brackets, each pair of UDFs cannot be merged. If only one UDF is specified, this UDF cannot be merged with any other UDF.
  • udf_name: indicates the UDF specified by the hint. You can specify only the function name or specify schema_name.udf_name. In the former case, the current schema is used as the schema of the UDF.

Example

select /*+ udffusion(udf1 udf3) */ udf1(udf2(c1), udf3(c2)) from t1