Top
Best
New

Posted by jascha_eng 10 hours ago

Pg_vectorsearch: An index that is faster than pgvector's IVFFlat and HNSW(github.com)
177 points | 47 commentspage 2
dmix 8 hours ago|
I'm curious how it compares to `pg_search` https://www.paradedb.com/blog/introducing-search
sroussey 5 hours ago||
Oh interesting… I have the entire SEC database to index (only indexing the text in a sliver of it at the moment) and use tsvector and I could use something faster.
thenoahhein 7 hours ago||
unrelated! full-text search vs vector search, and this has a more permissive license.
dmix 4 hours ago|||
Ah, I remember now that ParadeDB's pitch was doing hybrid search by using pgvector with keyword rankings from pg_search. Never got the chance to try it.
sroussey 5 hours ago|||
Sometimes you want both. I wonder if there is a postgresql reranker…
thenoahhein 4 hours ago|||
(Tiger data employee fwiw)

We have an alternative full-text search extension as well, pg_textsearch that's completely open source that supports hybrid re-ranking

Here's a blog on it (i linked to the section on hybrid search, there's a code snippet for you in there)

https://www.tigerdata.com/blog/introducing-pg_textsearch-tru...

We're big fans of extending Postgres for more and more usecases

thomasahle 7 hours ago||
How does it compare to Roar graph? https://github.com/matchyc/RoarGraph
jascha_eng 10 hours ago||
from the accompanying blog post: https://www.tigerdata.com/blog/announcing-pg_vectorsearch-sc...

> 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 9 hours ago|
Btw, I do work for Tiger Data/timescale, but am not at all associated with this team. I just found this release really exciting.

I sent the thread to Erik (the main contributor) though, so if you have feedback or questions, good chance that he'll see it.

jakobedding 8 hours ago||
How does this compare to pgvectorscale?
mfreed 8 hours ago|
We're also the authors behind pgvectorscale. From our blog post:

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.

panzi 2 hours ago||
Interesting!

We're currently use pgvectorscale. Some questions:

- Will pg_vectorsearch eventually also support vectors bigger than 1968 dimensions? E.g. VoyageAI can create embeddings with 2048 dimensions (but we don't actually need that at the moment, only 1024).

- Why did you choose C this time and not Rust, as you did with pgvectorscale?

- Why did you not just extend pgvectorscale with another index type instead of creating a whole new extensions?

esafak 9 hours ago||
Shouldn't you lead with your benchmarks if you're fast? qps and precision/recall, please.
jascha_eng 9 hours ago|
benchmarks are in the blog post and the benchmarking suite is also open sourced alongside it.
esafak 8 hours ago||
There are zero hits for 'blog' on the README and zero hits for the file name 'benchmark'. I suggest improving its discoverability.
alexpadula 8 hours ago|||
It’s there. Titled “Announcing pg_vectorsearch: Scalable Open-Source Vector Search in PostgreSQL”. In paragraph: “ The result: an index that is significantly faster”
dymk 5 hours ago||
[dead]
enordstr 8 hours ago||||
There's a link in the README, but it is not named blog.

Here's the link to the numbers for your convenience:

https://www.tigerdata.com/blog/announcing-pg_vectorsearch-sc...

jascha_eng 8 hours ago|||
https://news.ycombinator.com/item?id=50086249
mozidlb0e29352 3 hours ago||
[flagged]
ferozelalani 6 hours ago||
[flagged]
arbor-group 8 hours ago||
[flagged]
latencyharbor 6 hours ago||
[flagged]
hushpadapp 9 hours ago|
[flagged]
More comments...