Welcome to the new DOCS.vastdata.com. We've added new menus and a version selector, plus new persona and resource pages to help customers get started. Looking for a previous article? Use the docs search.

Vector search SQL

Prev Next

Applies to VAST Cluster 5.5.

VAST Vector Search runs through the VAST Query Engine, with the SQL on this page. Its reference lives in the VAST Vector Search section: SQL reference for VAST Vector Search. This page is a short index into it.

Topic Where
Vector column types: VECTOR(FLOAT, <dim>), VECTOR(FLOAT16, <dim>), VECTOR(INTEGER, <dim>) Vector column types
Creating a vector index: CREATE TABLE ... VECTOR CLUSTER BY <column> (metric = '...'), its properties and rules CREATE TABLE with a vector index
DESCRIBE and SHOW on a vector-indexed table, and reading the index settings DESCRIBE and SHOW
INSERT, UPDATE and DELETE on a vector-indexed table Changing data (DML)
Distance functions Distance functions
The query shape that uses the index Query shape that uses the index
Errors from vector DDL and queries Errors you'll see

Distance functions

These vector distance functions are available (see Vector Search):

  • array_distance
  • array_cosine_distance
  • array_negative_inner_product

Which function matches which index metric, and how to write the query so that it uses the index, is in distance functions.

Trino and Spark

Trino and Spark have no vector type and don't use the vector index; see Trino and Spark.