Overview
ob_hnsw_ef_search specifies the number of neighbor points searched by the HNSW algorithm in each graph layer during vector index queries. A larger value increases the number of neighbor points explored, enhancing the likelihood of finding the true nearest neighbor and improving search accuracy. However, it also prolongs the search time.
Privilege requirements
Query variables
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.SESSION_VARIABLESview to view the values of session system variables.Modify variables
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Uint |
| Default Value | 64 |
| Value range | [1,1000] |
| Effective Scope | Session |
| Modifiable | Yes, you can use the following methods:SETStatement modification. |
Sample query
Set the number of neighbor points searched by the HNSW algorithm in each layer of the graph during vector index queries to 50.
obclient> SET ob_hnsw_ef_search = 50;