Pgvector Is Now Faster Than Pinecone at 75% Less Cost
timescale.com
timescale.com
We're excited to release pgvectorscale. Our team built this extension to make PostgreSQL a better database for AI and to challenge the notion that PostgreSQL and pgvector are not performant for vector workloads.
pgvectorscale is open-source under the PostgreSQL license and free to use on any PostgreSQL database.
Here are two helpful companion reads to the post linked by OP: A benchmark of how PostgreSQL with pgvector and pgvectorscale performs against Pinecone [1], and a technical deep dive into pgvectorscale's StreamingDiskANN index and Statistical Binary Quantization implementations [2].
Questions and feedback welcome!
[1]: https://www.timescale.com/blog/pgvector-vs-pinecone/ [2]: https://www.timescale.com/blog/how-we-made-postgresql-as-fas...
I had tried pgvector 0.6.2 on an OCI free node (2cpu 64GB) and noticed a few things:
- pgvector build environment does NOT use -O3
- cosine indexing with/without -03 was 1h:6h elapsed time (10M 128 x fp64 table)
- memory consumption for indexing is huge, I estimated 2x table size
- you can do parts of tables (maintenance_work_mem=) substituting disk io for memory and this only doubles elapsed time
My general comment would be: prospective users need effective guidance (beyond the great advice already on the pgvector website) about memory, cpu, and disk.
I really like the pgvectorscale possibilities for faster lookups; some great ideas there.
This is exactly where we see ourselves contributing: both making pgvector faster and more efficient through pgvectorscale, and working to make the AI on Postgres developer experience first class.
The pgvectorscale repo is at: https://github.com/timescale/pgvectorscale
When should you use pgvector vs pgvector scale?
Is there any discussion about getting this added as a supported AWS RDS extensions?
So we would recommend using both from the start. There is no cost (technical or financial) for doing so.
There is discussion about getting this added to AWS RDS (as well as other PostgreSQL providers), but too early to share anything.