ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Ask AI
ScyllaDB Docs ScyllaDB Cloud Vector Search Vector Search FAQ

Vector Search FAQ¶

Frequently asked questions about Vector Search in ScyllaDB.

What similarity functions does ScyllaDB support?¶

ScyllaDB supports three similarity functions for vector indexes:

  • COSINE (default) — measures the angle between vectors. Best for normalized embeddings from text models.

  • DOT_PRODUCT — computes the inner product. Useful when vector magnitude carries meaning.

  • EUCLIDEAN — measures L2 (straight-line) distance. Best for spatial data.

See Choosing a Similarity Function for guidance on when to use each.

What is the maximum number of dimensions?¶

ScyllaDB supports vectors with dimensionality from 1 to 16,000. This is compatible with all major embedding models, including OpenAI (text-embedding-3-large at 3072 dimensions) and Cohere Embed.

How long until a new vector is searchable?¶

Newly inserted vectors are typically searchable within approximately 1 second (p50 latency), thanks to ScyllaDB’s fine-grained CDC reader. In the worst case, a change becomes visible within ~30 seconds (wide-framed CDC reader interval).

See Write-to-Query Latency for details.

Can I change the similarity function after creating an index?¶

No. Vector index options cannot be altered after creation. To change the similarity function (or any other index option), you must drop the existing index and recreate it with the new configuration:

DROP INDEX IF EXISTS my_index;
CREATE CUSTOM INDEX my_index ON myapp.comments(comment_vector)
USING 'vector_index'
WITH OPTIONS = { 'similarity_function': 'DOT_PRODUCT' };

The index will be rebuilt over the existing data when the new index is created.

Does ScyllaDB support filtering in vector search queries?¶

Yes. ScyllaDB supports filtered vector search using two types of indexes:

  • Local (per-partition) vector indexes (recommended) — search only within a single partition’s index. This is the fastest approach. Design your schema so that columns you filter on are part of the partition key and use equality (=) operators.

  • Global vector indexes — search the entire index space across all partitions. Always much slower than local indexes, especially as the dataset grows.

Avoid inequality (>, <, >=, <=) and IN operators in filtered vector queries - they force the database to scan a much larger portion of the index, with performance degrading proportionally to selectivity.

See Filtering for examples and details.

What is quantization and when should I use it?¶

Quantization reduces the precision of stored vectors to save memory. Instead of storing each dimension as a 4-byte float (f32), you can use:

  • f16 (2 bytes) — negligible recall loss for most workloads.

  • bf16 (2 bytes) — brain float, statistically equivalent to f16 for most models.

  • i8 (1 byte) — ~4x compression on vector data.

  • b1 (0.125 bytes) — ~32x compression on vector data; best with rescoring.

Note that quantization compresses only the vector data, not the HNSW graph structure, so actual total memory savings are always less than the per-dimension compression ratio. For example, i8 is 4x smaller per dimension than f32, but total index memory typically drops only ~3x.

Use quantization when your dataset is large enough that f32 indexes would exceed available memory. Combine with oversampling and rescoring to recover accuracy.

See Quantization and Rescoring for configuration guidance.

How do I estimate the memory needed for my vector index?¶

Use this simplified formula:

\[\text{Memory (bytes)} \approx N \times (D \times B + m \times 16) \times 1.2\]

Where N = number of vectors, D = dimensions, B = bytes per dimension (4 for f32, 2 for f16, 1 for i8), and m = maximum_node_connections (default: 16).

For worked examples, see the Sizing Guide.

Does ScyllaDB generate embeddings?¶

No. ScyllaDB stores and indexes vectors but does not generate them. Your application must use an external embedding model (OpenAI, Cohere, sentence-transformers, etc.) to produce vectors, then insert them into ScyllaDB.

See How Embeddings Work in the Concepts page.

Do I need to use the same embedding model for indexing and querying?¶

Yes. Vectors from different models exist in incompatible vector spaces and cannot be meaningfully compared. If you change your embedding model, you must re-embed all existing data. You can update the embeddings for all rows in the table and they will be refreshed in the index, but for performance reasons it is better to drop the index, update the data, and rebuild the index from scratch.

Why do vector tables require tablets-enabled keyspaces?¶

The HNSW vector index relies on ScyllaDB’s tablets data distribution mechanism for efficient data routing and sharding. Tablets provide fine-grained load balancing and dynamic rebalancing that the vector index depends on.

All ScyllaDB versions currently used by ScyllaDB Cloud enable tablets by default. If you still use a vnode-based cluster, you can create a separate tablets-enabled keyspace specifically for storing embeddings to overcome this limitation.

What does “recall” mean for vector search?¶

Recall is the fraction of true nearest neighbors found by the approximate search. A recall of 0.95 means 95% of the results match what an exact brute-force search would return. The remaining 5% are still genuinely similar vectors — they are just not the very closest ones.

You can increase recall by raising search_beam_width (ef_search), at the cost of higher query latency. See HNSW Parameters Explained.

Can I run exact (brute-force) vector search in ScyllaDB?¶

ScyllaDB’s vector search uses ANN (Approximate Nearest Neighbor) via the HNSW algorithm. There is no dedicated exact KNN mode. However, for small datasets, you can set a very high search_beam_width to achieve near-perfect recall.

For most use cases, ANN with default parameters provides recall above 0.95, which is functionally equivalent to exact search.

Is TTL supported on vector-indexed columns?¶

No. TTL (Time to Live) is not currently supported for vector-indexed columns. Writes with TTL on a column with a vector index are silently accepted but the TTL is ignored. See CQL Features Not Supported for the full list.

Support for TTL on vector-indexed columns is implemented in the upcoming ScyllaDB 2026.2.0 release.

Can I get similarity distance scores in query results?¶

Yes. You can retrieve similarity scores by calling one of the built-in similarity functions in your SELECT query:

  • similarity_cosine(<vector>, <vector>)

  • similarity_euclidean(<vector>, <vector>)

  • similarity_dot_product(<vector>, <vector>)

Each argument can be either a vector column name or a vector literal. Both arguments must have the same dimension.

For example:

SELECT comment, similarity_cosine(comment_vector, [0.1, 0.15, 0.3, 0.12, 0.05])
  FROM myapp.comments_vs;

Each function returns a float value in the range [0, 1], where values closer to 1 indicate greater similarity. The similarity_euclidean and similarity_dot_product functions do not perform vector normalization prior to computing similarity.

Note

similarity_dot_product assumes that all input vectors are L2-normalized. Supplying non-normalized vectors will produce values that are not meaningful for similarity comparison. If your vectors are not normalized, use similarity_cosine instead.

What’s Next¶

  • Working with Vector Search — CQL syntax for vector tables, indexes, and ANN queries.

  • Vector Search Concepts — deep dive into HNSW, similarity functions, and architecture.

  • Troubleshooting — common issues and solutions.

Was this page helpful?

PREVIOUS
Vector Search Troubleshooting
NEXT
Vector Search Glossary
  • Create an issue

On this page

  • Vector Search FAQ
    • What similarity functions does ScyllaDB support?
    • What is the maximum number of dimensions?
    • How long until a new vector is searchable?
    • Can I change the similarity function after creating an index?
    • Does ScyllaDB support filtering in vector search queries?
    • What is quantization and when should I use it?
    • How do I estimate the memory needed for my vector index?
    • Does ScyllaDB generate embeddings?
    • Do I need to use the same embedding model for indexing and querying?
    • Why do vector tables require tablets-enabled keyspaces?
    • What does “recall” mean for vector search?
    • Can I run exact (brute-force) vector search in ScyllaDB?
    • Is TTL supported on vector-indexed columns?
    • Can I get similarity distance scores in query results?
    • What’s Next
ScyllaDB Cloud
  • Quick Start Guide to ScyllaDB Cloud
  • About ScyllaDB Cloud as a Service
    • Benefits
    • Backups
    • Best Practices
    • Managing ScyllaDB Versions
    • Support, Alerts, and SLA Commitments
    • Billing
  • Deployment
    • Cluster Types - X Cloud and Standard
    • Bring Your Own Account (BYOA) - AWS
    • Bring Your Own Account (BYOA) - GCP
    • Terraform Provider
    • Free Trial
  • Cluster Connections
    • Configure AWS Transit Gateway (TGW) VPC Attachment Connection
    • Configure Virtual Private Cloud (VPC) Peering with AWS
    • Configure Virtual Private Cloud (VPC) Peering with GCP
    • Migrating Cluster Connection
    • Checking Cluster Availability
    • Glossary for Cluster Connections
  • Access Management
    • SAML Single Sign-On (SSO)
    • User Management
  • Managing Clusters
    • Resizing a Cluster
    • Adding a Datacenter
    • Deleting a Cluster
    • Maintenance Windows
    • Email Notifications
    • Usage
  • Using ScyllaDB
    • Apache Cassandra Query Language (CQL)
    • ScyllaDB Drivers
    • Tracing
    • Role Based Access Control (RBAC)
    • ScyllaDB Integrations
  • Vector Search
    • Quick Start Guide
    • Vector Search Concepts
    • Vector Search Deployments
    • Sizing and Capacity Planning
    • Working with Vector Search
    • Filtering
    • Quantization and Rescoring
    • Security
    • Troubleshooting
    • FAQ
    • Glossary
    • Reference
    • Example Project
  • Monitoring
    • Monitoring Clusters
    • Extracting Cluster Metrics in Prometheus Format
  • Security
    • Security Best Practices
    • Security Concepts
    • Database-level Encryption
    • Storage-level Encryption
    • Client-to-node Encryption
    • Service Users
    • Data Privacy and Compliance
  • API Documentation
    • Create a Personal Token for Authentication
    • Terraform Provider for ScyllaDB Cloud
    • API Reference
    • Error Codes
  • Help & Learning
    • Tutorials
    • FAQ
    • Getting Help
Docs Tutorials University Contact Us About Us
© 2026, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 24 Mar 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.1
Ask AI