Note
This variable is available starting with OceanBase Database V4.3.3 and only applies to MySQL-compatible tenants.
Description
ob_hnsw_ef_search specifies the number of neighbor points to search in each layer of the graph for the HNSW algorithm during vector index queries. A larger value means the algorithm explores more neighbor points, increasing the chances of finding true nearest neighbors and improving search accuracy. However, this also increases search time.
Privilege requirements
Query variables
The
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to view the values of session system variables.Modify variables
The
systenant and all MySQL user tenants can directly modify the values of session system variables for their tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Uint |
| Default value | 64 |
| Value range | [1,160000]
NoteThis variable is available starting with V4.3.5 BP4. The maximum value is changed from 1000 to 160000. |
| Scope | Session |
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Set the number of neighbor points to search in each layer of the graph for the HNSW algorithm during vector index queries to 50.
obclient> SET ob_hnsw_ef_search = 50;