P
pgvector/pgvector★ 23,928 · C
PostgreSQL extension for exact and approximate vector search alongside relational data
Custom / Check Repo
Side-by-side 2026 comparison in RAG, Data & Memory: pgvector/pgvector leads both total GitHub adoption (★ 23.9k) and recent 7-day momentum. Licensing: Custom / Check Repo vs Apache-2.0 · Commercial Friendly.
PostgreSQL extension for exact and approximate vector search alongside relational data
In-process C++ vector database for local hybrid retrieval
Backed by independent 6-hour D1 snapshots. Embed in GitHub READMEs or technical blogs.
| Dimension | pgvector/pgvector | alibaba/zvec |
|---|---|---|
| Total GitHub Stars | ★ 23,928 | ★ 16,322 |
| 24h / 7d Velocity | +13 / +96 | +7 / +29 |
| 7-Day Trend Curve | ||
| Engineering Health | B+ · 71/100 | A+ · 94/100 |
| Deployment Signals | Docker · Self-Hosted | Self-Hosted · Local AI |
| Primary Language | C | C++ |
| Commercial License | Custom / Check Repo | Apache-2.0 · Commercial Friendly |
| Activity | Updated today | Updated today |
| Latest Release | Rolling commits (main) | v0.8.1 |
| Best For | RAG and semantic search teams already on PostgreSQL that need to retrieve embeddings with document metadata and apply relational filters in one query. Start with exact search and add ANN when measured latency calls for it | Local RAG, desktop or edge search, and application-owned retrieval where a designated writer can maintain the collection and hybrid search should run without a separate database service |
vector extension per database and query embeddings over existing PostgreSQL connections using SQL.m, ef_construction, and hnsw.ef_search tune graph construction and search.ivfflat.probes controls how many lists a query searches.docker pull pgvector/pgvector:pg19-trixieimport zvec # Define collection schema schema = zvec.CollectionSchema( name="example", vectors=zvec.VectorSchema("embedding", zvec.DataType.VECTOR_FP32, 4), ) # Create collection collection = zvec.create_and_open(path="./zvec_example", schema=schema) # Insert documents collection.insert([ zvec.Doc(id="doc_1", vectors={"embedding": [0.1, 0.2, 0.3, 0.4]}), zvec.Doc(id="doc_2", vectors={"embedding": [0.2, 0.3, 0.4, 0.1]}), ]) # Search by vector similarity results = collection.query( zvec.Query(field_name="embedding", vector=[0.4, 0.3, 0.3, 0.1]), topk=10 ) # Results: list of {'id': str, 'score': float, ...}, sorted by relevance print(results)
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy