Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vecindex: redistribute vectors across level during split #135506

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andy-kimball
Copy link
Contributor

When a partition is split, move vectors to closer partitions:

  • For each vector in the splitting partition, move it to a "sibling" partition if its centroid is closer.
  • For each nearby vector at the same level as the splitting partition, move it to the splitting partition if its centroid is closer.

These optimizations significantly increase the recall rate of searches.

Prevent non-leaf-level partitions from becoming empty due to moving vectors between partitions, since that would cause the K-means tree to become unbalanced.

Epic: CRDB-42943

Release note: None

When a partition is split, move vectors to closer partitions:

* For each vector in the splitting partition, move it to a "sibling" partition
  if its centroid is closer.
* For each nearby vector at the same level as the splitting partition, move
  it to the splitting partition if its centroid is closer.

These optimizations significantly increase the recall rate of searches.

Prevent non-leaf-level partitions from becoming empty due to moving vectors
between partitions, since that would cause the K-means tree to become unbalanced.

Epic: CRDB-42943

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants