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

Rewrite distance operator <-> into the specific distance function if existing index won't trigger #148

Closed
Ngalstyan4 opened this issue Sep 16, 2023 · 1 comment · Fixed by #189
Labels
core Core Database

Comments

@Ngalstyan4
Copy link
Contributor

Currently we properly detect and fail the query in cases when the distance operator <-> is used outside of index-search context

We only check for existence of the index, however, and we do not check whether the index will actually be triggered.
This means that on small tables search queries fill fail unless we set enable_seqscan=off. This is bad UX.

We can instead detect that index is not used and rewrite the query to trigger the right distance operator.

@Ngalstyan4 Ngalstyan4 added the core Core Database label Sep 16, 2023
@gnehzza
Copy link

gnehzza commented Sep 19, 2023

I'm currently working on this issue, to avoid someone else overlapping with me.

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

Successfully merging a pull request may close this issue.

2 participants