Skip to content

Overview

vchord is a PostgreSQL extension designed for scalable, high-performance, and disk-efficient vector similarity search.

vchord is a PostgreSQL extension designed for scalable, high-performance, and disk-efficient vector similarity search.

With vchord, you can store 400,000 vectors for just $1, enabling significant savings: 6x more vectors compared to Pinecone’s optimized storage and 26x more than pgvector/pgvecto.rs for the same price1. For further insights, check out our launch blog post.

Features

vchord introduces remarkable enhancements over pgvecto.rs and pgvector:

⚡ Enhanced Performance: Delivering optimized operations with up to 5x faster queries, 16x higher insert throughput, and 16x quicker1 index building compared to pgvector’s HNSW implementation.

💰 Affordable Vector Search: Query 100M 768-dimensional vectors using just 32GB of memory, achieving 35ms P50 latency with top10 recall@95%, helping you keep infrastructure costs down while maintaining high search quality.

🔌 Seamless Integration: Fully compatible with pgvector data types and syntax while providing optimal defaults out of the box - no manual parameter tuning needed. Just drop in vchord for enhanced performance.

🔧 Accelerated Index Build: Leverage IVF to build indexes externally (e.g., on GPU) for faster KMeans clustering, combined with RaBitQ2 compression to efficiently store vectors while maintaining search quality through autonomous reranking.

📏 Long Vector Support: Store and search vectors up to 60,0003 dimensions, enabling the use of the best high-dimensional models like text-embedding-3-large with ease.

🌐 Scale As You Want: Based on horizontal expansion, the query of 5M / 100M 768-dimensional vectors can be easily scaled to 10000+ QPS with top10 recall@90% at a competitive cost4

Quick Start

For new users, we recommend using the Docker image to get started quickly. If you do not prefer Docker, please read installation guide for other installation methods.

docker run \
  --name vectorchord-demo \
  -e POSTGRES_PASSWORD=mysecretpassword \
  -p 5432:5432 \
  -d tensorchord/vchord-postgres:pg18-v1.1.1

In addition to the base image with the VectorChord extension, we provide an all-in-one image, tensorchord/vchord-suite:pg18-latest. This comprehensive image includes all official TensorChord extensions. Developers should select an image tag that is compatible with their extension’s version, as indicated in the support matrix.

Then you can connect to the database using the psql command line tool. The default username is postgres, and the default password is mysecretpassword.

psql -h localhost -p 5432 -U postgres

Now you can play with VectorChord!

VectorChord depends on pgvector, including the vector representation. Since you can use them directly, your application can be easily migrated without pain!

CREATE EXTENSION IF NOT EXISTS vchord CASCADE;

Similar to pgvector, you can create a table with vector column and insert some rows to it.

CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));
INSERT INTO items (embedding) SELECT ARRAY[random(), random(), random()]::real[] FROM generate_series(1, 1000);

With VectorChord, you can create vchordrq indexes.

CREATE INDEX ON items USING vchordrq (embedding vector_l2_ops);

And then perform a vector search using SELECT ... ORDER BY ... LIMIT ....

SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;

For more usage, please read:

License

vchord is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only). We welcome any commercial collaboration or support inquiries—please email us at [email protected] with any questions.


  1. Based on MyScale Benchmark with 768-dimensional vectors and 95% recall. Please check out our blog post for more details. ↩︎ ↩︎

  2. Gao, Jianyang, and Cheng Long. “RaBitQ: Quantizing High-Dimensional Vectors with a Theoretical Error Bound for Approximate Nearest Neighbor Search.” Proceedings of the ACM on Management of Data 2.3 (2024): 1-27. ↩︎

  3. There is a limitation at pgvector of 16,000 dimensions now. If you really have a large dimension(16,000<dim<60,000), consider changing VECTOR_MAX_DIM and compile pgvector yourself. ↩︎

  4. Please check our blog post for more details, the PostgreSQL scalability is powered by CloudNative-PG. ↩︎