Ready for the Billion-Scale Era. Host 100M vectors on a single i4i.xlarge ($247/mo) and scale seamlessly to 1B+.
Official Site · Blog · Docs · Feedback · Contact Us
VectorChord (vchord) is a PostgreSQL extension engineered for scalable, high-performance, and cost-effective vector search.
To efficiently store vectors while preserving search quality, VectorChord applies RaBitQ1 compression together with autonomous reranking. With VectorChord, 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 price.
VectorChord introduces remarkable enhancements over pgvecto.rs and pgvector:
💰 Affordable Vector Search: Host 100M × 768-dimensional vectors → AWS i4i.xlarge ($247/month)2, host 1B × 96-dimensional vectors → i7ie.6xlarge ($2246/month)3, helping you keep infrastructure costs down while maintaining competitive search quality.
âš¡ Accelerated Index Build: Index 100 million vectors in just 20 minutes. Powered by hierarchical K-means and highly optimized disk operations, VectorChord eliminates the bottleneck of vector indexing on a single machine with limited hardware resources.
📈 Smoothly Scale Up: Scale with confidence as your data grows. Through dimensionality reduction and sampling4, VectorChord effectively controls memory growth, enabling 1B-vector indexes to be built on machines with 128GB of memory in practice.
🔌 Seamless Integration: Fully compatible with pgvector data types and syntax while providing optimal defaults out of the box - no complex parameter tuning needed. Just drop in VectorChord for enhanced experience.
💾 Efficient Storage with Low-Bit Data type: Drastically reduce storage costs with our native 4-bit (RaBitQ4) and 8-bit (RaBitQ8) vector types. Achieve massive space savings without compromising search quality—RaBitQ8 maintains high precision with <1% recall loss.
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 ghcr.io/tensorchord/vchord-postgres:pg18-v1.1.0Note
In addition to the base image with the VectorChord extension, we provide an all-in-one image, tensorchord/vchord-suite:pg17-latest. This comprehensive image includes all official TensorChord extensions, including VectorChord, VectorChord-bm25 and pg_tokenizer.rs . 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 postgresNow 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:
- Indexing
- Multi-Vector Retrieval
- Quantization Types
- Graph Index
- Quantization Types
- Similarity Filter
- PostgreSQL Tuning
- Monitoring
- Fallback Parameters
- Measure Recall
- Prewarm
- Prefilter
- Prefetch
- Rerank in Table
- Partitioning Tuning
- External Build
This software is licensed under a dual license model:
-
GNU Affero General Public License v3 (AGPLv3): You may use, modify, and distribute this software under the terms of the AGPLv3.
-
Elastic License v2 (ELv2): You may also use, modify, and distribute this software under the Elastic License v2, which has specific restrictions.
You may choose either license based on your needs. We welcome any commercial collaboration or support, so please email us vectorchord-inquiry@tensorchord.ai with any questions or requests regarding the licenses.
Footnotes
-
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. ↩
-
Please check out our blog post for more technique details and document for usages. ↩
