Ask HN: Alternatives to Vector DB?
26 comments
·March 18, 2025jankovicsandras
Postgres is a good idea.
Shameless plug: https://github.com/jankovicsandras/plpgsql_bm25
BM25 search implemented in PL/pgSQL, there's also an example of Hybrid (BM25+pgvector) search in the repo.
romanhn
There's Postgres with pgvector extension.
dghlsakjg
This would be my vote.
There are probably more performant options, but for universality, you are best off going with a popular SQL DB that has vector extensions or support. SQLLite is another option if you want even more portability.
bilater
yup keep it simple. hybrid search on supabase with keyword + pg vector. use a good embedding model with inner product (not cosine so its faster). there was a good article about learnings in this space recently here https://news.ycombinator.com/item?id=43299659
redskyluan
How is pg performed on windows? Never tried before
tmaly
I have used pg years ago on windows when it was like version 7, so I suspect it still works well.
bobosha
We used Qdrant in production - it's a solid vector db offering and highly recommend. However we are moving everything to Postgres with pgvector for simplicity i.e fewer moving parts. It was a PITA keeping data synced between pgsql <> qdrant.
geuis
Postgres with pgvector extension. Have been using it in production for months and it works great.
yawnxyz
if you have small data requirements (less than 100mb) I just run FAISS for embeddings and store the rows of data and vectors in JSON.
I then have a small python script to run a vector similarity algo like cosine similarity or whatever. It's not the fanciest or most efficient, but it works surprisingly well.
I use it to search/rank my own blog posts (~300+) for relevancy. So the entire thing is only like 10mb. Probably will get super slow for really large dataasets
samber
Elasticsearch is a good bet, if you need to use multiple filters with your queries, and when you grow above the acceptable size of an in-memory database.
BenoitP
Brute force it. Gemm routines can give you a best dot product among 300k vectors well under a second
abraxas
postgres pgvector is a decent implementation by now which is likely available in most setups that postgres will run on.
You can also use faiss if you want it all in memory at all times and have the RAM to support it.
What's your use case and the volume of vectors you want to look up?
tmaly
I have a knowledge store of all my notes in markdown. I wanted a way to incorporate them with RAG.
abraxas
How many vectors is that? If under 100K then keep it all in memory. Hell probably in the low millions would be OK. You can literally write them to a flat file and load into memory and do a full scan for every lookup and it will be fast enough. If not then use faiss with hnsw indexing and it will be screaming fast.
codingmoney
You can try Milvus, Weaviate, or Qdrant. They all support multiple platforms and are relatively easy to set up.
miZero0
[dead]
schreiaj
SQLite via libsql is my go to for lightweight stuff.
Has vector embedding columns out of the box.
tmaly
Thanks! I had no idea this existed.
softwaredoug
There’s a bazillion python libraries and regular databases / search engines with vector indices that run cross platform. Postgres, hnswlib, Elasticsearch, etc.
Prosammer
Check out lanceDB, it looks awesome for this.
A while back I was looking for a vector database that would work across Windows / Mac / Linux platforms. Some of the options required specific processors like Intel. I am curious if there are any alternatives to a Vector DB that can run cross platform and are easy to setup?