--- title: "VAST Vector Search cheat sheet" slug: "dev-vector-search-reference-cheat-sheet" description: "Explore VAST Vector Search in Cluster 5.5: create vector-indexed tables, search efficiently, and connect with the Query Engine for optimal results." updated: 2026-10-30T18:19:01Z published: 2026-10-30T18:19:01Z canonical: "docs.vastdata.com/dev-vector-search-reference-cheat-sheet" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # VAST Vector Search cheat sheet *Applies to VAST Cluster 5.5. Examples use the VAST DataBase Python SDK 2.1.0.* A one-page summary of VAST Vector Search in VAST Cluster 5.5: create a vector-indexed table, search it, and connect. Each item links to the page with the details. ## Create a table with a vector index ``` CREATE TABLE "bucket/schema".t ( id BIGINT, embedding VECTOR(FLOAT, 1024) ) VECTOR CLUSTER BY embedding ( metric = 'l2sq', -- l2sq | cosine | ip cluster_quantization = 'scalar_8bit', -- default if omitted search_quantization = 'scalar_8bit' -- default if omitted ); ``` There's no `CREATE VECTOR INDEX`: the index is created with the table, and can't be added, changed or dropped later. See [SQL reference](/develop/docs/dev-vector-search-reference-sql#create-table-with-a-vector-index). ## Search ``` SELECT id, array_distance(embedding::FLOAT[1024], ARRAY[...]::FLOAT[1024]) AS dist FROM "bucket/schema".t ORDER BY dist LIMIT 10; ``` | Metric | Order by | | --- | --- | | `l2sq` | `array_distance` | | `cosine` | `array_cosine_distance` | | `ip` | `array_negative_inner_product` | To use the index: one distance expression in `ORDER BY`, ascending, with `LIMIT k`. No `OFFSET`, and no similarity sorted descending. `EXPLAIN` shows `VAST_VEC_INDEX_SCAN` when the index is used. See [query design](/develop/docs/dev-vector-search-guides-query-design). ## Quantization pairs | Cluster / search | Allowed? | | --- | --- | | omitted / omitted | Yes: `scalar_8bit` / `scalar_8bit` | | `none` / `none` | Yes | | `none` / `scalar_8bit` | Yes | | `scalar_8bit` / `scalar_8bit` | Yes | | `scalar_8bit` / `none` | No | See [quantization](/develop/docs/dev-vector-search-guides-quantization). ## Connect - Endpoint: a VAST Query Engine endpoint, on a virtual IP pool with the Query Engine role, with the cluster's S3 port (for example `http://<qe-vip>:9090`). See [setup](/develop/docs/dev-vector-search-operations-setup#which-endpoint-does-what). - Permissions: `s3:QueryEngine*` and the `s3:Tabular*` actions on the bucket. The Python SDK also needs `s3:ListBucket`. - ADBC options: `vast.db.endpoint`, `vast.db.access_key`, `vast.db.secret_key`. Connect with `autocommit=True`, or commit, or your DDL is lost. See [ADBC](/develop/docs/dev-vector-search-integrations-adbc). - Search tuning: `vast.db.setting.vector_search_min_prob`, `vector_search_max_prob` and `vector_search_pruning_distance_ratio` (four comma-separated values each), set on the connection with `set_options`. See [search session settings](/develop/docs/dev-vector-search-reference-configuration). **Admin task: send to your platform team.** The Query Engine VIP pool and the permissions. See [setup](/develop/docs/dev-vector-search-operations-setup) and [security](/develop/docs/dev-vector-search-operations-security). ## Python SDK ``` from vastdb import VectorIndexSpec table = schema.create_table("t", columns, vector_index=VectorIndexSpec(column="embedding", distance_metric="l2sq")) reader = table.vector_search(vec=q, columns=["id"], limit=10) ``` The result has a `vast_pysdk_vector_dist` column. Don't use `vector_search()` on an `ip` table: it returns the least similar rows first ([Python SDK](/develop/docs/dev-vector-search-integrations-python-sdk#inner-product-indexes-search-with-sql)). Signatures: [SDK reference](/develop/docs/dev-database-reference-sdk#vector-index). ## Operations - Clustering progress: the REST API grades it `A+`, `A`, `B` or `C` (`clustering_progress_label`). `C` doesn't mean the index is unused. See [performance](/develop/docs/dev-vector-search-operations-performance#check-the-index-first). - Replication: not supported for vector-indexed tables. See [limits](/develop/docs/dev-vector-search-reference-limits#table-rules). - Trino and Spark don't use the vector index: search through the VAST Query Engine. See [limits](/develop/docs/dev-vector-search-reference-limits#search-rules). ## See also - [SQL reference](/develop/docs/dev-vector-search-reference-sql) - [Limits](/develop/docs/dev-vector-search-reference-limits) - [Release notes](/develop/docs/dev-vector-search-release-notes)