Note
This variable is available starting with V4.4.2 BP2.
Overview
The ob_udf_cost_factor parameter specifies the cost factor for UDF predicates.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can use theSHOW VARIABLESstatement, or theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (in Oracle-compatible mode) and theinformation_schema.GLOBAL_VARIABLESview (in MySQL-compatible mode), to view the values of global system variables.Session level
The
SHOW VARIABLESstatement, or theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (in Oracle-compatible mode) and theinformation_schema.SESSION_VARIABLESview (in MySQL-compatible mode), can be used by thesystenant and all user tenants to view the values of session system variables.
Modify variables
Global effective
The
systenant can directly modify the values of global system variables.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the values of global system variables.Oracle-compatible user tenants must have the
ALTER SYSTEMprivilege to modify the values of global system variables.
Session expiration
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Int |
| Default Value | 100 |
| Value range | [1, 10000000] |
| Effective Scope |
|
| Modifiable | Yes, you can use theSETStatement modification. |
Usage instructions
This variable is used to adjust the cost coefficient of a UDF predicate, which affects the optimizer's decision on the execution order of predicates. The cost coefficient represents the actual runtime cost of a UDF predicate when processing each record. It can be configured according to the specific situation of the UDF predicate. Generally, the default value of 100 is sufficient.
Configuration example
Set the cost coefficient of the UDF predicate to 100000.
Effective globally
obclient> SET GLOBAL ob_udf_cost_factor = 100000;Session expiration
obclient> SET ob_udf_cost_factor = 100000;
