REBUILD_INDEX
Use the DBMS_VECTOR.REBUILD_INDEX function to rebuild an index.
Syntax
This API rebuilds an index. In case only the idx_name is provided,
it rebuilds the index using get_ddl. When all params are provided,
it performs a drop index followed by a call to
dbms_vector.create_index().
DBMS_VECTOR.REBUILD_INDEX (
IDX_NAME IN VARCHAR2,
TABLE_NAME IN VARCHAR2 DEFAULT NULL,
IDX_VECTOR_COL IN VARCHAR2 DEFAULT NULL,
IDX_INCLUDE_COLS IN VARCHAR2 DEFAULT NULL,
IDX_PARTITIONING_SCHEME IN VARCHAR2 DEFAULT NULL,
IDX_ORGANIZATION IN VARCHAR2 DEFAULT NULL,
IDX_DISTANCE_METRIC IN VARCHAR2 DEFAULT 'COSINE',
IDX_ACCURACY IN NUMBER DEFAULT 90,
IDX_PARAMETERS IN CLOB DEFAULT NULL,
IDX_PARALLEL_CREATION IN NUMBER DEFAULT 1,
);Parameters
Specify the input parameters in JSON format.
Table 12-11 REBUILD_INDEX (IN) Parameters of DBMS_VECTOR
| Parameter | Description |
|---|---|
|
|
Table on which to create the index. |
|
|
Name of the index. |
|
|
Vector column on which to rebuild the index. |
|
|
Partitioning scheme. |
|
|
Index organization. Either |
|
|
Distance computation metric. Defaults to |
|
|
Target accuracy. |
|
|
Takes in CLOB with type of index and associated parameters. Type, neighbor partitions for IVF, neighbors/efConstruction for HNSW) . |
|
|
Number of parallel threads used for index construction. |
DATA
This function accepts the input data type as VARCHAR2, NUMBER, or CLOB.
If you specify only the idx_name value, then the function rebuilds the index using get_ddl. If you specify all the parameter values, then the function first performs a drop index operation and then calls the DBMS_VECTOR.CREATE_INDEX() function.
Parent topic: DBMS_VECTOR