Skip to content
This repository was archived by the owner on Oct 6, 2026. It is now read-only.
This repository was archived by the owner on Oct 6, 2026. It is now read-only.

Vector indexes page: say which Cloud plans support them, and that a non-prefix filter skips the index #23467

Open

Description

@voyagi

Page: https://docs.cockroachlabs.com/docs/stable/vector-indexes

Two things I had to measure while building on a CockroachDB Cloud Basic cluster that the page could answer directly.

1. Which Cloud plans support vector indexes. The page doesn't say whether they work on Basic, Standard and Advanced. On a Basic cluster running v26.2.1, on 2026-08-03, SHOW CLUSTER SETTING feature.vector_index.enabled returned true and CREATE VECTOR INDEX completed. A line on plan availability, and on whether the setting is already on for Basic, would save the next person the experiment.

2. What a filter on a non-prefix column does to the plan. The page says an index is only used when each prefix column is constrained, and lists "Index acceleration with filters is only supported if the filters match prefix columns" as a limitation. I read that limitation as "the filter won't be accelerated" and expected a vector search followed by filtering. What I measured was the index skipped entirely. Same Basic cluster, August 2026, statistics freshly collected:

Filter Index Plan
none (embedding vector_cosine_ops) vector search
WHERE evicted_at IS NULL (embedding vector_cosine_ops) FULL SCAN
WHERE workspace_id = $1 (embedding vector_cosine_ops) FULL SCAN
WHERE workspace_id = $1 AND is_live (workspace_id, is_live, embedding vector_cosine_ops) vector search, prefix spans
WHERE workspace_id = $1 AND is_live AND embedding IS NOT NULL (workspace_id, is_live, embedding vector_cosine_ops) FULL SCAN

The query was SELECT ... FROM memory WHERE <filter> ORDER BY embedding <=> $2::VECTOR LIMIT $3. The last row surprised me most: an IS NOT NULL check on the vector column itself was enough to lose the index.

Suggested addition under "Define prefix columns": one sentence saying that when a query also filters on a column that isn't a prefix column, the optimizer doesn't use the vector index and falls back to a full scan, with an EXPLAIN pair showing both cases.

Jira issue: DOC-19240

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions