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
Both 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 operates in response-first mode or fast mode. Users prefer quick result return with relatively stable RT. - When set to
RECALL_FIRST, it operates in result-first mode or depth-first search mode. The system strives to retrieve at least K matching records, even if this significantly slows down some queries.
Configuration example
Set the query strategy for vector indexes to response time first.
obclient> ALTER SYSTEM SET ob_vector_search_strategy = 'LATENCY_FIRST';
