-
Notifications
You must be signed in to change notification settings - Fork 438
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
Lack of result when selecting data without limit #553
Comments
Hi @zhrt123, I'm not able to reproduce the results in the "Problem" section, but it appears you're using a modified version of Postgres based on the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Backgroud
For Perl test 017_hnsw_filtering.pl and 009_ivfflat_filtering.pl, if the number of rows is small (less than 1000), the results of tests are different from the expected results. (expect Seq scan, but get Index scan.)
PostgreSQL version: 16.1
pgvector version: 0.7.0
Problem
I executed the following SQL statements:
and then analyze this SQL statement:
The planner wants to execute the query with
Index scan
. However, our indexhnsw
limited the output to 40 candidates, which caused us to lose some results of the select query. In my experiment:Index scan
.Seq scan
.Result comparison
Conclusion
We can use
SET enable_indexscan = off
to avoid usingIndex Scan
for select queries without limit. But the Perl testmay mislead the developer that pgvector won't use
Index Scan
in this scene.The text was updated successfully, but these errors were encountered: