Company
Date Published
Author
Egor Romanov, Pavel Borisov
Word count
1859
Language
English
Hacker News points
15

Summary

The HNSW index has been incorporated into pgvector v0.5.0, enabling lightning-fast vector searches. The benchmarking tests aimed to reproduce and improve the results of a previous comparison between pgvector and Qdrant. The tests used the ANN Benchmarks methodology, which included helper scripts, runtime experiments, and pre-warming RAM techniques. The results showed that pgvector outperformed Qdrant in terms of accuracy and queries per second (QPS), especially when using more probes. Scaling the database was found to be predictable, with performance improving as the size of the database increased. Increasing lists was also found to improve performance without adding more compute resources. Real data had higher accuracy than random data, and optimizing pgvector performance involved adjusting Postgres config, preferring inner-product distances, pre-warming databases, and benchmarking specific workloads. Going into production required over-provisioning RAM, uploading data, running benchmarks, scaling down compute add-ons, and repeating the process to find optimal values for lists and probes constants. The roadmap includes adding HNSW index, product quantization, and parallel index builds in future versions of pgvector.