Vector Indexes in a Globally Distributed Database
Inverted File Flat (IVF) index and Hierarchical Navigable Small World (HNSW) index are supported on sharded tables in a distributed database; however there are some considerations.
Note:
-
Global indexes are not supported on sharded tables; however, this limitation does not exist for the global HNSW and IVF index.
-
Hybrid Vector Indexes (HVI) are not currently supported on sharded tables.
-
GDSCTL commands
MOVE CHUNK
,ADD CDB
, andADD SHARD
will raise ORA-05118 if there are global vector indexes on sharded tables. Drop the global vector indexes before performing these operations.
Inverted File Flat Index
Inverted File Flat Index (IVF Flat or simply IVF) is a partitioned-based index that lets you balance high-search quality with reasonable speed.
You can create a local IVF index on vector columns in a sharded table. There is no syntax change required.
-
IVF indexes and HNSW indexes on a sharded table must be created on the shard catalog database with
SHARD DDL
enabled. -
The
CREATE INDEX
command is propagated as is to all of the shards by the shard coordinator. TheCREATE INDEX
clause scope is the shard.
There is no syntax change to create an IVF index on a sharded table, when compared to the syntax to create an IVF index on a non-sharded table.
CREATE VECTOR INDEX ivf_image
ON houses (image)
ORGANIZATION NEIGHBOR PARTITIONS WITH TARGET ACCURACY 95
DISTANCE EUCLIDEAN PARAMETERS
(type IVF, NEIGHBOR PARTITIONS 1000) PARALLEL 16;
Hierarchical Navigable Small World Index
There is no syntax change to create a Hierarchical Navigable Small World (HNSW) index on a sharded table, when compared to the syntax to create an HNSW index on a non-sharded table.
CREATE VECTOR INDEX hnsw_image
ON houses (image)
ORGANIZATION INMEMORY NEIGHBOR GRAPH
WITH TARGET ACCURACY 95;
Parent topic: Create Vector Indexes and Hybrid Vector Indexes