INDEX_VECTOR_MEMORY_ADVISOR
Use the INDEX_VECTOR_MEMORY_ADVISOR
procedure to determine the vector memory size needed for a particular vector index. This helps you evaluate the number of indexes that can fit for each simulated vector memory size.
Syntax
-
Using the number and type of vector dimensions that you want to store in your vector index.
DBMS_VECTOR.INDEX_VECTOR_MEMORY_ADVISOR( INDEX_TYPE IN VARCHAR2, NUM_VECTORS IN NUMBER, DIM_COUNT IN NUMBER, DIM_TYPE IN VARCHAR2, PARAMETER_JSON IN CLOB, RESPONSE_JSON OUT CLOB);
-
Using the table and vector column on which you want to create your vector index:
DBMS_VECTOR.INDEX_VECTOR_MEMORY_ADVISOR( TABLE_OWNER IN VARCHAR2, TABLE_NAME IN VARCHAR2, COLUMN_NAME IN VARCHAR2, INDEX_TYPE IN VARCHAR2, PARAMETER_JSON IN CLOB, RESPONSE_JSON OUT CLOB);
Table 12-6 Syntax Details: INDEX_VECTOR_MEMORY_ADVISOR
Parameter | Description |
---|---|
|
Type of vector index:
|
|
Number of vectors that you plan to create the vector index with. |
|
Number of dimensions of a vector as a |
|
Type of dimensions of a vector. Possible values are:
|
|
Owner name of the table on which to create the vector index. |
|
Table name on which to create the vector index. |
|
Name of the vector column on which to create the vector index. |
|
Input parameter in JSON format. You can specify only one of the following form:
Note: You cannot specify values for |
|
JSON-formatted response string. |
Examples
-
Using neighbors in the parameters list:
SET SERVEROUTPUT ON; DECLARE response_json CLOB; BEGIN DBMS_VECTOR.INDEX_VECTOR_MEMORY_ADVISOR( INDEX_TYPE=>'HNSW', NUM_VECTORS=>10000, DIM_COUNT=>768, DIM_TYPE=>'FLOAT32', PARAMETER_JSON=>'{"neighbors":32}', RESPONSE_JSON=>response_json); END; /
Result:
Suggested vector memory pool size: 59918628 Bytes
-
Using accuracy in the parameters list:
SET SERVEROUTPUT ON; DECLARE response_json CLOB; BEGIN DBMS_VECTOR.INDEX_VECTOR_MEMORY_ADVISOR( INDEX_TYPE=>'HNSW', NUM_VECTORS=>10000, DIM_COUNT=>768, DIM_TYPE=>'FLOAT32', PARAMETER_JSON=>'{"accuracy":90}', RESPONSE_JSON=>response_json); END; /
Result:
Suggested vector memory pool size: 53926765 Bytes
-
Using the table and vector column on which you want to create the vector index:
SET SERVEROUTPUT ON; DECLARE response_json CLOB; BEGIN DBMS_VECTOR.INDEX_VECTOR_MEMORY_ADVISOR( 'VECTOR_USER', 'VECTAB', 'DATA_VECTOR', 'HNSW', RESPONSE_JSON=>response_json); END; /
Example result:
Using default accuracy: 90% Suggested vector memory pool size: 76396251 Bytes
Related Topics
Parent topic: DBMS_VECTOR