Note
This variable is available starting with V4.4.2 BP2.
Overview
ob_udf_selectivity is used to set the selectivity of a UDF predicate.
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 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 | 0.005 |
| Value range | [0, 1] |
| Effective Scope |
|
| Modifiable | Yes, you can use the following methods:SETStatement modification. |
Usage instructions
You can configure the selectivity based on the actual filtering conditions of the UDF predicate. Generally, the default value of 0.005 is sufficient.
Configuration example
Configure the selectivity of the UDF predicate to 0.999.
Effective globally
obclient> SET GLOBAL ob_udf_selectivity = 0.999;Session Validity Period
obclient> SET ob_udf_selectivity = 0.999;
