CREATE_INDEX

Use the DBMS_VECTOR.CREATE_INDEX procedure to create an index.

Syntax

DBMS_VECTOR.CREATE_INDEX (
    IDX_NAME                    IN VARCHAR2,
    TABLE_NAME                  IN VARCHAR2,
    IDX_VECTOR_COL              IN VARCHAR2,
    IDX_INCLUDE_COLS            IN VARCHAR2 DEFAULT NULL,
    IDX_PARTITIONING_SCHEME     IN VARCHAR2 default 'LOCAL',
    IDX_ORGANIZATION            IN VARCHAR2,
    IDX_DISTANCE_METRIC         IN VARCHAR2 DEFAULT COSINE,
    IDX_ACCURACY                IN NUMBER DEFAULT 90,
    IDX_PARAMETERS              IN CLOB,
    IDX_PARALLEL_CREATION       IN NUMBER DEFAULT 1
); 

Parameters

Specify the input parameters in JSON format.

Table 12-3 CREATE_INDEX (IN) Parameters of DBMS_VECTOR

Parameter Description

table_name

Table on which to create the index.

idx_name

Name of the index.

idx_vector_col

Vector column on which to create the index.

idx_partitioning_scheme

Partitioning scheme. LOCAL or GLOBAL.

idx_organization

Index organization. Either NEIGHBOR PARTITIONS or INMEMORY NEIGHBOR GRAPH.

idx_distance_metric

Distance computation metric. Defaults to COSINE. Can also be MANHATTAN, HAMMING, DOT, EUCLIDEAN, L2_SQUARED, EUCLIDEAN_SQUARED.

idx_accuracy

Target accuracy.

idx_parameters

Takes in CLOB with type of index and associated parameters. Type, neighbor partitions for IVF, neighbors/efConstruction for HNSW)

.

idx_parallel_creation

Number of parallel threads used for index construction.