Skip to content

Slow search queries when running pgvector with external database #590

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

Open
gabrieloqm opened this issue Apr 24, 2025 · 1 comment
Open

Comments

@gabrieloqm
Copy link

Hello everyone,
I am running ann-benchmarks using pgvector algorithm/extension on different datasets provided by this repository and with different parameters for the hnsw index. At first, I have tested it on my local machine, running the run.py script. But then, i have tested it on a external database instead of initializing and creating a postgreSQL database which runs on the docker container initialized by the script mentioned above.
I have enhanced some of the postgreSQL external database configurations, as you can see below (the comparison between the database created by the ann-benchmark script and my external database):

Image

What I am facing is that the qps metric on my external database is way worse(100~ times slower) than the one I get when running the database locally, even though the external database configuration is more robust.
Any tips on what could it be, or rather, what configuration could i change to improve queries speed?

@SunnyBo0302
Copy link

It might be a network-related issue.

Could you try running ann-benchmark on the server that hosts the external database directly, to see if the problem persists?

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

No branches or pull requests

2 participants