Note
- In V4.3.x, this parameter is available starting with V4.3.5.5 hotfix6.
- In V4.4.x, this parameter is available starting with V4.4.1 hotfix10.
- In V4.6.x, this parameter is available starting with V4.6.0.
Overview
ob_vector_search_strategy is used to control the query strategy during vector index queries.
Privilege requirements
Query parameters
The
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | String |
| Default Value |
|
| Value range |
|
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to Restart the OBServer Node for the Change to Take Effect | No. The setting takes effect immediately. |
Usage instructions
- To ensure response time, set
ob_vector_search_strategytoLATENCY_FIRST. - For scenarios that are not time-sensitive and require a high recall rate, you can set it to
RECALL_FIRST. - When set to
LATENCY_FIRST, it is the response-first mode or fast mode. Users require results to be returned as soon as possible, and the RT is relatively stable. - When set to
RECALL_FIRST, it is the result-first mode/deep search mode. The system tries its best to find up to K matching records, tolerating some queries becoming significantly slower as a result.
Configuration example
Set the query strategy for the vector index to response time first.
obclient> ALTER SYSTEM SET ob_vector_search_strategy = 'LATENCY_FIRST';
