> This write amplification is large enough that our efforts to tune indexing throughput have started to hit diminishing returns.<p>> don't key on the ANN address. That is precisely the change turbopuffer v3 makes. As you can imagine, it is not a trivial change.<p>This is a direct parallel to how Postgres and Mysql built indexes.<p>Your design choice went from a Postgres design pattern to a Mysql one. The difference is the reindexing cost vs the lookup cost - Postgres optimized for lookup and Mysql does for indexing on writes. Or more accurately, Postgres was better with good schema design using joins & mysql was optimized for a bad design with less normalization where many indexes exist for the same table.<p>Postgres always points an index to a row-id within postgres which is an arbitrary value which changes on each update.<p>Mysql, always assuming the storage engine is pluggable, points to the primary index entry and adds an extra indirection to the lookup.<p>This means that you point the mysql index to a stable id, so unless you go update the primary key for a row, you won't have to update the indexes for all the attribute lookups you might have made to data.<p>I don't do databases any more that much, but the design for NIMBLE file format has a lot of quirks which are relevant to this specific idea (wide tables).<p>But the old Uber post about switching from Postgres to Mysql to prevent index amplification[1] is a direct mirror to this post.<p>[1] - <a href="https://www.uber.com/us/en/blog/postgres-to-mysql-migration/" rel="nofollow">https://www.uber.com/us/en/blog/postgres-to-mysql-migration/</a>
> mysql was optimized for a bad design<p>TIL I should have been using mysql the whole time
> Your design choice went from a Postgres design pattern to a Mysql one. The difference is the reindexing cost vs the lookup cost - Postgres optimized for lookup and Mysql does for indexing on writes. Or more accurately, Postgres was better with good schema design using joins & mysql was optimized for a bad design with less normalization where many indexes exist for the same table<p>You are right that MySQL does better when you have lots of indexes, but I don't think the tradeoff is that the overall Postgres architecture is better with good schema design.<p>Having secondary indexes point the primary key enables things like undo logging, which obviates the need for vacuums - vacuums being the most painful part of Postgres. On top of that your primary key index will be mostly cached so the cost of the indirection is much smaller than it may first appear
I think OP is just alluding to the fact that Postgres needs to do less work to go from secondary index to table data, since the tid is a direct pointer to the exact page and slotted entry while MySQL needs a b-tree walk.<p>> primary key index will be mostly cached so the cost of the indirection is much smaller than it may first appear<p>Not sure I follow. If it's in-memory you save having to read from disk, but you still have to walk the b-tree to go from PK to data.
> I think OP is just alluding to the fact that Postgres needs to do less work to go from secondary index to table data, since the tid is a direct pointer to the exact page and slotted entry while MySQL needs a b-tree walk.<p>Yes, this is true, but they framed this as "the Postgres approach is better when you have a good schema design", but that's not true. There are plenty of ways the MySQL approach is better even when you have a really good schema.<p>> Not sure I follow. If it's in-memory you save having to read from disk, but you still have to walk the b-tree to go from PK to data.<p>The point I was trying to make is that going to disk is going to be orders of magnitude slower than doing an in-memory B-tree traversal. Because of that, the cost of doing an extra b-tree traversal to find the page you're looking for is a relatively small cost compared to reading the page in the first place
MySQL was generally (pre 8) optimized for point queries on primary keys. So rows are stored in the PK index, the PK index is a clustered index. Everything more or less falls out of this.
I find it amusing people started quoting LLM output and are responding to it. Hopefully the original authors end up having the LLM respond back.
MSSQL (Clustered Indexes) and Oracle (Index Organized Tables) among others let you chose because there are advantages and disadvantages for different situations.<p>Not having true clustered indexes in PG is something I miss coming from MSSQL, it helps performance when the majority of access is always primary index avoid indirection from index lookup then tuple lookup and it also saves space if its the only index.
Vector databases were always more about retrieval than either vectors or data storage. But the term stuck all too well and companies held on to it a tad too long. Sorry :)
That's just a search engine, but then you're competing with traditional players like Elasticsearch and Vespa who all have built-in vector support by now, and you have to compete on attributes like price, performance, features, and who can mention 'AI' the most times on their web page.
AI has some of the craziest up and down cycles of tech I've ever seen
I've really liked lancedb for similar use cases. Not just that it is OSS. But Lance treats ANN as a secondary index similar to what turbopuffer v3 does. Rows sit in fragments, and the vector index never moves them.
I’m developing a local “code graph mcp tool” (not yet published) and followed a similar path, though I may have been able to go further since I have fewer vectors in my database (even on projects with 50M LOC).<p>At first, I tried all those popular vector databases and was disappointed with their performance. In the end, the best and fastest solution turned out to be building a multi-database system on SQLite, compiled with everything related to multi-client operations removed. Only exclusive mode was left. Everything is as binary as possible. The index is completely separate — an IVF with pre-training — and is built on the GPU (250K vectors are built, processed, and saved in 4 seconds). Right now, my biggest problem is frequent data changes, and I need to implement optimizations to reduce recalculations.<p>So far, I haven’t seen any vector database implementations that are heading in the right direction. Maybe only Lancedb looks promising, but it’s too heavy for my needs.
Dashboard was last updated on September 7, it started on September 5. Bug? Or no progress? It's linked in the blog post so would expect it to work: <a href="https://turbopuffer.com/v3" rel="nofollow">https://turbopuffer.com/v3</a>
Soon they’ll just sell you markdown.
> The problem with a vector primary index<p>We've realized this a long time ago at TopK and built a flexible serverless search engine from scratch. Supports dense/sparse vectors, late interaction, lexical search, indexed regex, filtering, and custom scoring in one query.<p>- <a href="https://www.topk.io/blog/vector-dbs-are-the-wrong-abstraction-how-we-built-a-new-search-database-from-scratch" rel="nofollow">https://www.topk.io/blog/vector-dbs-are-the-wrong-abstractio...</a>
- <a href="https://www.topk.io/blog/topk-embed-v1" rel="nofollow">https://www.topk.io/blog/topk-embed-v1</a>
the multi-vector duplication thing makes sense, copying every attribute once per vector explodes quickly. what's the new primary index?
I'd want to see p99 at 1k+ QPS on the same scale
Waitint for the CEO of Qdrant to step in
Im not full read up on RAG pipelines, but has anyone ever tried to make the database a neural net itself? I.e get rid of any sort of traditional databases, and then you basically just have some sort of autoencoder?
There's been quite a bit of research into this over the past 3-4 years under the name "generative retrieval." The general approach is to use a transformer and treat the weights as the index. You input the query, and then used constrained decoding to generate the document ID.
In some sense there's probably a database compression scheme that does something similar. Usually people care too much about fidelity
I find very little reason to use a pure vector database for enterprise retrieval. We built an enterprise retrieval engine on top of a SQL database with native vector support, and the flexibility is something we cannot ignore. Vector similarity is just one query primitive alongside full text search, filters, joins, ordering and normal relational predicates. Tenant/app/collection isolation becomes part of the query itself. ACLs, document versions, categories, metadata constraints and temporal filters are ordinary predicates rather than something you have to bolt onto a vector store. SQL is already going to be part of almost any enterprise system. Adding a separate vector database introduces another moving part and syncing two system whenever you update your data is the most difficult thing to get right.
This sounds like the Postgres vs. InnoDB argument 10 years later. Postings pointed at physical location (the ANN slot), so every SPFresh rebalance rewrote every index touching that doc. InnoDB solved this by pointing secondary indexes at the PK and eating an extra lookup on read. Curious what that extra lookup costs you when it's an S3 GET instead of a B-tree hop.<p>"Updating one vector can move hundreds of attributes and their indexes" is basically Uber's 2016 Postgres write amplification post, but for search. Same fix too: stop pointing indexes at where the row lives.<p>So ANN becomes a secondary index that points at a doc ID, and vector search now needs a hop to complete. Do clusters keep their own copy of the vectors so the search itself stays local, and only result fetch pays the indirection? Otherwise cold p99 seems like it gets worse.
[flagged]
AI Slop. Will not read.
The article?<p>turbopuffer is founded by some of the smartest people I ever worked with in past jobs. I strongly doubt they used an LLM in the writing of this article.
Are humans who use em dashes that intimidating to you?
I kept asking myself "is this ai written" while reading it to. Nothing to do wit h the em dashes. Phrasing like:
> RIP, primary vector index.
> The solution to these problems is simple: don't key on the ANN address. That is precisely the change turbopuffer v3 makes. As you can imagine, it is not a trivial change."<p>Cute heading, followed by wordy opening sentence that feels like it's repeating stuff even when it's not
Ad hominem attacks are against the rules on HN, but derision of bad faith actors is encouraged. :)
FYI, replying "Stupid. Will not read" is less effort.
It would be nice to have a page that actually loads. This one doesn't. RIP.<p>UPDATE: It loads now, but it didn't when it was first posted. Traffic load on the server does matter.
loads just fine on my $10k laptop with 10g internet here in NYC
Takes 11 seconds to load on Firefox on Linux with 3G-level throttling enabled in Dev Tools.
Also loads fine on my beater in the sticks :)
Do you actually think that 10G makes pages load faster than 1G or even 100M? It doesn't. The blocker was most likely on the source server, not on your side.
Loads really fast for me. (MacBook Air, average internet)<p>If you still have issues, try <a href="https://web.archive.org/web/20261001100105/https://turbopuffer.com/blog/rip-vector-database" rel="nofollow">https://web.archive.org/web/20261001100105/https://turbopuff...</a>
[dead]
[dead]
Is it time to kill the database and replace it with a LLM optimized compiled version that simply implements the required API directly in (Rust) code, without any dynamic overhead? It probably will still be based of off a base design or a base file format.<p>Ultimately this system will encompass the whole OS, of course, but the DB might be the best place to start.
You mean get rid of Postgres and build bespoke database-esque systems for every use case?<p>If so, then no. It is not time for that.
Yeah, I'm struggling to come up with a really good time for that.<p>The best I got is if you are trying to do an old-school style video game asset/save game storage. But even then, the value in just using sqlite or even parquet is really high.<p>There's so many really good data formats that deciding on a new one at this point seems pretty silly. Particularly because what you sign up for when you make a new one is losing any and all tools that could be used to work with and diagnose that data.
Instead of a database, the LLM will expose an api endpoint and build a database on demand?<p>That's interesting. Maybe to decrease latency the LLM could "cache" it's build of it's database and reuse in between instances. It could host this artifact on a "hub" of git trees and then any new use cases that come up, can be added to this git tree. Then it can possibly be reused in different use cases.
Is it time to get rid of hammers and replace them with swiss army knives?
SQLite already exists and some people use it
I have seen this happening already at two different companies. And I'm also doing it as well. Particularly for search indexes where there's no risk of data loss.
Unless you're tigerbeetle and want to handroll every single thing you do lol