# US 2025/0094399 A1 · Automatic index selection

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0094399 A1
- Document ID: US20250094399A1
- Status: Published application
- Kind: A1
- Application number: 18/885,639
- Filed: 2024-09-14
- Published: 2025-03-20
- Earliest claimed: 2023-09-16
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Aurosish Mishra; Shasank Kisan Chavan; Tirthankar Lahiri; Agnivo Saha; Rohan Aggarwal; Weiwei Gong; Juan R. Loaiza
- Web page: https://patentgrep.com/patent/US20250094399A1

## CPC

- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/2228: {Indexing structures}
- G06F 16/2237: {Vectors, bitmaps or matrices}
- G06F 16/2246: {Trees, e.g. B+trees}
- G06F 16/2358: {Change logging, detection, and notification (replication G06F16/27)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques for automatically selecting a type of vector index are provided. In one technique, in response to determining to generate a vector index based on a base table that stores a plurality of vectors, a number of the plurality of vectors is identified. Based at least on the number of the plurality of vectors, a particular type of vector index is identified from among a plurality of types of vector indexes. Examples of the plurality of types include an HNSW index and an IVF index. A vector index of the particular type is generated for the base table. Another criterion in identifying a type of vector index to generate is the number of neighbors that is a parameter in generating a certain type of vector index.

## Claims

### Claim 1

A method comprising:
in response to determining to generate a vector index based on a base table that stores a plurality of vectors, identifying a number of the plurality of vectors;
based at least on the number of the plurality of vectors, identifying a particular type of vector index from among a plurality of types of vector indexes;
generating, for the base table, a vector index of the particular type;
wherein the method is performed by one or more computing devices.

### Claim 2 (depends on 1)

The method of claim 1, wherein the plurality of types of vector indexes comprises an HNSW index and an IVF index.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
identifying a number of neighbors that is a parameter in generating a certain type of vector index;
wherein identifying the particular type of vector index is further based on the number of neighbors.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
receiving a database statement that includes an instruction to create a vector index;
in response to receiving the database statement, determining to generate the vector index.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
determining to generate an IVF index that will comprise a centroids table and a plurality of partitions storing the plurality of vectors, each partition corresponding to a different centroid of a plurality of centroids in the centroids table;
determining a number of centroids in the plurality of centroids;
based on the number of centroids, determining whether to generate an HNSW index for the centroids table.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
in response to determining to generate an HNSW index for the centroids table, generating the HNSW index for the centroids table;
causing the HNSW index to be stored in each compute instance of a plurality of compute instances.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
determining to generate an IVF index that will comprise a centroids table and a plurality of partitions storing the plurality of vectors, each partition corresponding to a different centroid of a plurality of centroids in the centroids table;
for each partition of multiple partitions in the plurality of partitions, generating an HNSW index for vectors that are stored in said each partition.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
based on a number of vector queries that result in accessing two or more partitions of the plurality of partitions, generating a single HNSW index for vectors that are stored in the two or more partitions.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
generating an IVF index that comprises a centroids table and a plurality of partitions storing the plurality of vectors, each partition corresponding to a different centroid of a plurality of centroids in the centroids table;
identifying a subset of the plurality of partitions;
causing each partition in the subset to be stored in a different compute instance of a plurality of compute instances.

### Claim 10 (depends on 1)

The method of claim 1, wherein the plurality of vectors is a first plurality of vectors, wherein the vector index is a first vector index, the method further comprising, after generating the first vector index of the particular type:
receiving a first plurality of changes to the first plurality of vectors;
updating the first plurality of vectors based on the first plurality of changes to generate a second plurality of vectors that is different than the first plurality of vectors;
based at least on the number of the second plurality of vectors, identifying a second type of vector index from among the plurality of types of vector indexes, wherein the second type of vector index is different than the particular type;
generating a second vector index of the second type.

### Claim 11 (depends on 10)

The method of claim 10, wherein the particular type is HNSW and the second type is IVF, the method further comprising:
while generating the second vector index of the second type:
receiving one or more vector queries;
processing the one or more vector queries against the first vector index and a shared journal;
receiving one or more changes to the second plurality of vectors;
storing the one or more changes in the shared journal;
after the second vector index is generated, applying the one or more changes indicated in the shared journal to the second vector index.

### Claim 12

One or more non-transitory storage media storing instructions which, when executed by one or more computing devices, cause:
in response to determining to generate a vector index based on a base table that stores a plurality of vectors, identifying a number of the plurality of vectors;
based at least on the number of the plurality of vectors, identifying a particular type of vector index from among a plurality of types of vector indexes;
generating, for the base table, a vector index of the particular type.

### Claim 13 (depends on 12)

The one or more storage media of claim 12, wherein the plurality of types of vector indexes comprises an HNSW index and an IVF index.

### Claim 14 (depends on 12)

The one or more storage media of claim 12, wherein the instructions which, when executed by the one or more computing devices, further cause:
identifying a number of neighbors that is a parameter in generating a certain type of vector index;
wherein identifying the particular type of vector index is further based on the number of neighbors.

### Claim 15 (depends on 12)

The one or more storage media of claim 12, wherein the instructions which, when executed by the one or more computing devices, further cause:
receiving a database statement that includes an instruction to create a vector index;
in response to receiving the database statement, determining to generate the vector index.

### Claim 16 (depends on 12)

The one or more storage media of claim 12, wherein the instructions which, when executed by the one or more computing devices, further cause:
determining to generate an IVF index that will comprise a centroids table and a plurality of partitions storing the plurality of vectors, each partition corresponding to a different centroid of a plurality of centroids in the centroids table;
determining a number of centroids in the plurality of centroids;
based on the number of centroids, determining whether to generate an HNSW index for the centroids table.

### Claim 17 (depends on 12)

The one or more storage media of claim 12, wherein the instructions which, when executed by the one or more computing devices, further cause:
determining to generate an IVF index that will comprise a centroids table and a plurality of partitions storing the plurality of vectors, each partition corresponding to a different centroid of a plurality of centroids in the centroids table;
for each partition of multiple partitions in the plurality of partitions, generating an HNSW index for vectors that are stored in said each partition.

### Claim 18 (depends on 12)

The one or more storage media of claim 12, wherein the instructions which, when executed by the one or more computing devices, further cause:
generating an IVF index that comprises a centroids table and a plurality of partitions storing the plurality of vectors, each partition corresponding to a different centroid of a plurality of centroids in the centroids table;
identifying a subset of the plurality of partitions;
causing each partition in the subset to be stored in a different compute instance of a plurality of compute instances.

### Claim 19 (depends on 12)

The one or more storage media of claim 12, wherein the plurality of vectors is a first plurality of vectors, wherein the vector index is a first vector index, wherein the instructions which, when executed by the one or more computing devices, further cause, after generating the first vector index of the particular type:
receiving a first plurality of changes to the first plurality of vectors;
updating the first plurality of vectors based on the first plurality of changes to generate a second plurality of vectors that is different than the first plurality of vectors;
based at least on the number of the second plurality of vectors, identifying a second type of vector index from among the plurality of types of vector indexes, wherein the second type of vector index is different than the particular type;
generating a second vector index of the second type.

### Claim 20 (depends on 19)

The one or more storage media of claim 19, wherein the particular type is HNSW and the second type is IVF, wherein the instructions which, when executed by the one or more computing devices, further cause:
while generating the second vector index of the second type:
receiving one or more vector queries;
processing the one or more vector queries against the first vector index and a shared journal;
receiving one or more changes to the second plurality of vectors;
storing the one or more changes in the shared journal;
after the second vector index is generated, applying the one or more changes indicated in the shared journal to the second vector index.
