88 points jascha_eng 2 hours ago 32 comments
jascha_eng 2 hours ago | parent
> TLDR: We are launching pg_vectorsearch, a new open-source PostgreSQL extension that makes vector search dramatically faster and more cost-efficient. Its new PRISM index uses partitioning and compression instead of HNSW's graph-based approach, delivering faster queries with a fraction of the memory and significantly faster index builds. At 100 million vectors, PRISM achieved 6 ms query latency on a machine with 4× less memory than HNSW, with index builds over 20× faster.
jascha_eng 1 hour ago | parent
I sent the thread to Erik (the main contributor) though, so if you have feedback or questions, good chance that he'll see it.
Rapzid 2 hours ago | parent
Edit: post filtering only
I don't understand how people are efficiently implementing tenant/user/permission scopes with these indexes.
enordstr 2 hours ago | parent
esafak 1 hour ago | parent
3abiton 1 hour ago | parent
qeternity 1 hour ago | parent
But how are people doing recency biasing with vector databases?
All of our approaches are either expensive or super hacky.
EgregiousCube 2 hours ago | parent
enordstr 1 hour ago | parent
swe_dima 1 hour ago | parent
jascha_eng 1 hour ago | parent
esafak 1 hour ago | parent
jascha_eng 1 hour ago | parent
esafak 1 hour ago | parent
jascha_eng 1 hour ago | parent
enordstr 1 hour ago | parent
Here's the link to the numbers for your convenience:
https://www.tigerdata.com/blog/announcing-pg_vectorsearch-sc...
alexpadula 1 hour ago | parent
alexpadula 1 hour ago | parent
jakobedding 1 hour ago | parent
mfreed 40 minutes ago | parent
This isn’t the first vector index we’ve built and open-sourced for PostgreSQL. In 2024, Tiger Data released pgvectorscale, which used a graph-based indexing algorithm inspired by Microsoft’s DiskANN research. We deliberately chose a disk-optimized design so that indexes could scale beyond available RAM. Our initial benchmarks were promising, but as adoption grew and we tested against a wider variety of datasets, particularly low-dimensional ones, we encountered a troubling problem: portions of the graph could become unreachable, causing recall to degrade. We searched the literature for a principled solution but couldn’t find one, and the heuristics we tried worked on some datasets but not others.
That’s a frustrating failure mode for a search index. When queries are slow, you can measure the problem and tune accordingly. But when recall degrades, you might not even notice until users start questioning the quality of their search results. And telling them to experiment with yet another set of tuning parameters isn’t the experience we want to provide.
Meanwhile, partitioned-list approaches reminiscent of IVFFlat were getting a second life, as advances in compression and optimization addressed many of their old limitations. More importantly, they offered stronger guarantees than we could achieve by patching a graph-based index. We came to believe they were a better foundation, and decided to start over.
With the introduction of pg_vectorsearch, we are shifting the majority of our vector-search development efforts to this new architecture. The existing pgvectorscale extension, which is stable and handling production workloads currently, will enter maintenance mode.
ilumanty 58 minutes ago | parent
vikrantrathore 33 minutes ago | parent
Project zaxonlite: https://github.com/insanai/zaxonlite
Project sqlodin: https://github.com/insanai/sqlodin
Just you need to remember sqlite support single writer at a time so both needs to work with that limitation. PostgreSQL uses MVCC, so performance for concurrent writes from multiple clients might be better. Did not do benchmark against it so cannot say.
ethagnawl 29 minutes ago | parent
veonik 7 minutes ago | parent
devy 54 minutes ago | parent
- pg_vectorsearch uses a quantized IVF index called PRISM. PRISM caps at 1968 dimensions for vectors. If your previous HNSW index has more dimensions than that, you're SOL (at least for now until they fix that).
- pg_vectorsearch requires Postgres version 18 or above. If you run PG versions below that you need to migrate your database first. Many legacy PG production environment are way dated on PG 14 or 15, migration is prohibitively high cost to just try this out.
- pg_vectorsearch shipped yesterday and it's obviously alpha. Hasn't been battle tested in production environments outside of Timescale's. Also since it's so new, it isn't on Azure's allowed-extension list or any other Hyperscale's managed PG instances' allowed extension list. It takes time to graduate from alpha and mature. So if you run managaed PG instances from hyperscaler's cloud, you're SOL (at least for now until this matures into those ecosystems) or you have to migrate to a PG 18 self-hosted.
curious_cat_163 44 minutes ago | parent
Like, I would love to learn more about the design process that led to a whole new thing. I am sure the decision was not taken lightly, but the README is very thin on the details for why anyone should go through the troubles above, at least in the making of it.
surister 31 minutes ago | parent
mfreed 13 minutes ago | parent
But one of the great things about open source and PostgreSQL's extension architecture is that these projects can coexist! pg_vectorsearch can work directly with pgvector's existing data types, so developers can use either index.
enordstr 9 minutes ago | parent
As a company, we want to move at a different pace and try things that a project like pgvector wouldn’t necessarily allow (and rightfully so). pg_vectorsearch is alpha-level software, while pgvector is stable. Releasing early is a way to make it available to the community sooner and getting feedback.
Then there are all kinds of technical reasons: different architectures, different implementation choices, etc. There's also the freedom to try new things and going in completely different directions.
dmix 34 minutes ago | parent
thenoahhein 27 minutes ago | parent
thomasahle 10 minutes ago | parent