Earlier quoted context omitted.
Exactly. We use Supabase too but are at a scale where it just made sense to use a second, dedicated vector db (Pinecone) than to bloat our Postgres db that has a completely different workload
Bloat your DB... or pull in an entirely new vendor and bloat your entire operational outlay. I'd really love to know what kind of insane scale justifies that tradeoff...
Every database will become a vector database sooner or later
81–90 of 143 posts
Re: Every database will become a vector database sooner or later
#82Earlier quoted context omitted.
> compared to the last db hype of NOSQL NoSQL has been around for over 20+ years. Since then Cassandra, DynamoDB, FoundationDB, MongoDB, Neo4J, Redis etc are not only still around but widely used and powering many of the services you use today.
The difference is that today those DBs are generally considered as complements to SQL databases targeting specific use cases. Back in the peak NoSQL days people were pushing the narrative that you'd never need to use a SQL database for anything ever again.
RDBMS is such a mature and powerful technology, and with the vast power in modern single-node hardware, they will scale to considerable sizes. But there is a limit.
Once a table or set of tables hit a certain scale, it needs to be distributed. Once you get to those scales, you are likely dealing with the threat of exponential data growth, so doing the "distributed Postgres" will bandaid the problem ... but you are starting to run into the CAP theorem's problems.
You'll need to AP-scale the biggest data tables, and since that almost always means a big coding change lift and introduction of an AP-scaling database, it will almost always be a six months to a year transition, and possibly adding an entirely new DB technology (Cassandra / DynamoDB / maybe FoundationDB).
I have yet to have anyone explain how joins scale on an AP distributed database except in limited situations where the joined data is somehow node-local to the other tables, usually some hierarchical situation. Otherwise you are pulling data from lots of nodes and aggregating and comparing the different sets to account for node drift / partitions / network failures. Cassandra and Dynamo basically say "you are scaling a single table/query/update/pre-joined data table".
Which really isn't fun for RDBMS folks. Because it is a shitload of denormalization on top of all the AP headaches and distributed transactions / updates.
As I said, megahuge machines really make that an outside case unless your use case really emphasizes the "A" in CAP, where write speed can be tolerated to be low and you want to tolerate entire cloud or datacenter outages.
But yeah, nosql was never going to kill the rdbms. The functionality/power of rdbms/SQL is so so so so much higher. Just be aware when you're about to shoot over the limit and prepare for the code changes to handle true scale in the (unlikely) event you're going to need it.
Re: Every database will become a vector database sooner or later
#83It is true that every major DB ventor, SQL or not, is smashing the AI/vector keyword on their front pages. In Elastic for example, their vector capabilities have gone from laughable to respectable in a year. Its a lot simpler to just use one DB instead of many. But a question for true DB experts here: 1. Is there any real advantage to building a dedicated vector DB from scratch? 2. Is vector DB something that can be…
The operational pains if you need to self host this stuff are real, split brain, backup/restore not really considered (compared to a normal databases features), things like replication and sharding _exist_ but often are a buggy mess.
OLAP is definitely distinct from OLTP, and most of these vector queries have some aspect of both - they are similar to OLAP in that they need a decent amount of preprocessing to be useful (inferrence) and they are similar to OLTP in that they are often used for serving point queries or tiny lookups.
Re: Every database will become a vector database sooner or later
#84Earlier quoted context omitted.
Well you could store numbers all fine, but indexing vectors for similarity queries seems fairly recent and not all that widespread in the transactional world. As the traditional db move forward in the space the need for dedicated vector databases will likely shrink, except for some very specific implementation that offer unique enough features (I.e. deeplake does vector search over object storage, which is very conve…
sqlite has r-trees for instance [0]. Could it be good enough for most use cases? If it's to query a knowledge base for instance, a couple dimensions should be sufficient. With the added benefit of being able to query your data in other ways. [0] https://www.sqlite.org/rtree.html
https://github.com/asg017/sqlite-vss
Not associated with the project, just love SQLite and find it very useful.
Re: Every database will become a vector database sooner or later
#85Earlier quoted context omitted.
It’s interesting that I never considered why OLTP and OLAP are basically orthogonal technologies. Are there any major players that have an integrated solution for both? I guess it makes sense because the infra is so different, but I’m not sure whether it need be.
As far as the big players are concerned, Google offers AlloyDB ( https://cloud.google.com/alloydb ) while Amazon offers Aurora ( https://aws.amazon.com/rds/aurora/ )
How does that relate to the OLTP vs OLAP dimension? Are they not both primarily OLTP dbs still?
Re: Every database will become a vector database sooner or later
#86[flagged]
That statement can definitely be true for many technologies, either because of a lot of hype and promises surrounding them (e.g. the history of MongoDB and how the NoSQL movement was like initially), or due to the mistaken belief that you need them from the very beginning of development even in cases when they are a good fit. I guess the first part is basically describing the Gartner hype cycle, which feels vaguely truthful: https://en.wikipedia.org/wiki/Gartner_hype_cycle Even good tech is susceptible to this, until people actually figure out what it's best used for and when.
If you're in the early stage of developing a prototype, or are working on a system for a small business, then a single RDBMS can indeed work for most use cases - even when you need to store JSON, use full-text indices or even store a reasonable amount of binary data (or even a NoSQL solution, depending on the constraints). It's the same with how you can build an entire business on a monolith written in boring tech, like .NET or Java, with whatever you want for the front end.
Eventually, you might be well served to branch out - at the point where the need for something more specialized becomes more pressing and you can actually afford the time and human resources to manage the complexity/integration effort and so on, or even hire people proficient in that particular tech in the first place. If you have an entire team just for search, then you're probably at that point. If it's just another ticket in your issue tracker for a developer or two to implement, just use the simple index approach with hopefully good enough results.
If it's a greenfield project and you're doing something very novel, all bets are probably off, though.
Re: Every database will become a vector database sooner or later
#87Earlier quoted context omitted.
Well you could store numbers all fine, but indexing vectors for similarity queries seems fairly recent and not all that widespread in the transactional world. As the traditional db move forward in the space the need for dedicated vector databases will likely shrink, except for some very specific implementation that offer unique enough features (I.e. deeplake does vector search over object storage, which is very conve…
How is indexing a vector different from indexing a varchar or an integer ? If you convert a vector into a byteaarray it should be no different from a bytearray of varchar but for the bytearray contents. Now if you want to do similarity search you have to measure the distance between 2 or more vectors and that's independent of the indexing. No ? So any database with sufficient memory should be able to accomplish this…
Re: Every database will become a vector database sooner or later
#88Earlier quoted context omitted.
The difference is that today those DBs are generally considered as complements to SQL databases targeting specific use cases. Back in the peak NoSQL days people were pushing the narrative that you'd never need to use a SQL database for anything ever again.
IMO this is the deal: RDBMS is such a mature and powerful technology, and with the vast power in modern single-node hardware, they will scale to considerable sizes. But there is a limit. Once a table or set of tables hit a certain scale, it needs to be distributed. Once you get to those scales, you are likely dealing with the threat of exponential data growth, so doing the "distributed Postgres" will bandaid the prob…
Massive RDBMS instances are awful to manage. Hard to backup/restore/fork. Hard to migrate tables and schemas without causing downtime. Accidental downtime happens all the time due to locks, bad indexes, bad query plans , etc etc. at large scale they are capricious beasts, care and feeding and most importantly changing them becomes a dark art.
Don’t let them get too big you’ll regret it :)
Re: Every database will become a vector database sooner or later
#89Earlier quoted context omitted.
Also the distance metric for r*-trees is just plain wacky for anything other than low-dimensional Euclidean space. Even if you could make it perform well, it would not do what you want.
Are you saying this because r-trees expect a proper metric space, and people have the need to index datasets over non-metric spaces?
Re: Every database will become a vector database sooner or later
#90You pair a vector db with a metadata store (can be anything, but ideally you want low gravity with the vdb and disk for fast retrieval... i.e. leveldb, sqlite equivalents... or hell a traditional db - and the author is right traditional dbs dont need to work too hard to create a ANN extension)
In general, the greater challenge is the data engineering and overhead of managing retrieval stores (in terms of the data-integration/model pipelines) ... so I'm bull on the solutions addressing opportunities here.