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

Support more types of queries for vector indexes. #8659

Open
nicktobey opened this issue Dec 10, 2024 · 0 comments
Open

Support more types of queries for vector indexes. #8659

nicktobey opened this issue Dec 10, 2024 · 0 comments
Labels
enhancement New feature or request vectors

Comments

@nicktobey
Copy link
Contributor

Currently, vector indexes are only applied to a very specific type of query:

SELECT ... FROM ... ORDER BY VEC_DISTANCE(literal, field) LIMIT lim;

But we should be more flexible in what we support.

For instance, we probably don't need to require that one side of the distance function is a literal, as long as it comes from a source that only has one row.

Alternatively, if neither input to VEC_DISTANCE is a literal but one input is estimated to have a small number of rows, we could run a subquery for each row and then merge the results.

I'm sure there's other types of queries we may want to support, but we should see how vector indexes are actually being used and handle cases based on user need.

@timsehn timsehn added the enhancement New feature or request label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vectors
Projects
None yet
Development

No branches or pull requests

2 participants