[KongchangAI]
Product

pgvector

pgvector is an open-source vector extension plugin for PostgreSQL that enables storing, indexing, and querying high-dimensional vector data within a relational database. It supports both exact search and approximate nearest neighbor (ANN) search, provides multiple distance metrics such as Euclidean distance, cosine similarity, and inner product, and is compatible with index algorithms including IVFFlat and HNSW. pgvector is commonly used for storing and retrieving machine learning embedding vectors, allowing developers to implement semantic search and recommendation features within PostgreSQL without a dedicated vector database.

Core Facts

Timeline (last 90 days)

Dec 3

The HNSW index has a large in-memory graph structure and long build times, and early versions of pgvector had limited support for parallel builds and incremental updates.

Unverified50%
Dec 3

For most teams, before pgvector hits a bottleneck, a more pragmatic approach may be to first try parameter tuning, partitioning or read-write separation.

Unverified50%
Dec 3

When the number of vector rows reaches the hundreds of millions and the total volume enters the TB range, pgvector index builds may take hours or even longer, and memory usage and page cache contention during queries significantly raise P99 latency.

Unverified50%
Dec 3

pgvector is suitable for small-to-medium-scale vector retrieval, but when the data volume breaks through the TB level, query latency, index build time and resource consumption all become problems.

Unverified50%
Dec 3

A developer migrated 1.7 TB of data from pgvector to a self-built Rust search engine and shared the experience on Hacker News.

Unverified50%
Dec 3

Migrating from pgvector to a self-built system requires reimplementing modules such as vector similarity computation, inverted indexing and persistent storage, and ensuring data consistency.

Unverified50%
Nov 26

Common indexes for pgvector include IVFFlat and HNSW; the former builds quickly but its recall is affected by parameters, while the latter has better query performance but higher memory usage.

Unverified50%
Nov 26

Remora is built on PostgreSQL and pgvector.

Unverified50%
Nov 20

PostgreSQL's extension ecosystem (such as PostGIS, pg_stat_statements, Citus, pgvector, etc.) is bound to major versions at the compilation and ABI level, and extensions usually need to be recompiled or the corresponding version installed for the new major version.

Unverified50%
Nov 7

pgvector supports two types of vector indexes, HNSW and IVFFlat, and index construction and queries are constrained by PostgreSQL's page management, concurrency control and memory model.

Unverified50%

40 more timeline events

All Facts (20)

Verified

PostgreSQL can support vector retrieval via pgvector.

90%
Verified

pgvector is an open-source extension for PostgreSQL that natively adds vector data types and similarity search capabilities to the relational database, supporting both exact nearest-neighbor and approximate nearest-neighbor (HNSW, IVFFlat index) retrieval modes.

90%
Verified

The pgvector extension adds vector storage and similarity search capabilities to PostgreSQL, enabling Supabase to serve simultaneously as a traditional database and a vector database.

90%
Verified

Vector storage commonly uses dedicated vector databases such as Pinecone, Chroma, and Weaviate, which support approximate nearest neighbor retrieval.

80%
Verified

Vector databases (such as Pinecone, Weaviate, Milvus, etc.) convert text into high-dimensional vectors via embedding models and use cosine similarity or Euclidean distance for approximate nearest neighbor (ANN) search.

80%
Verified

Pinecone, Chroma, and Weaviate are common vector database products.

80%
Verified

Long-term memory is typically implemented with the help of vector databases (such as Chroma, Pinecone, Weaviate, Milvus, etc.) to enable semantic retrieval.

80%
Verified

典型的RAG流程包括文档切片、向量化嵌入、存入向量数据库、语义检索、上下文拼接和最终生成六个步骤

75%
Verified

Pinecone is a fully managed, cloud-native vector database.

70%
Verified

Two default practices for long-term memory: extraction should be placed asynchronously outside the reply path (because the facts of this conversation are already in this session's history); take a snapshot of memory at the start of each conversation (the memory block is placed before the history, and updating it midway would break the cache).

65%
Verified

For applications with vector scale below tens of millions and insensitivity to latency, pgvector's existing indexes may already be sufficient, and there is no need to introduce new dependencies.

65%
Verified

HNSW and IVF are two mainstream approximate nearest neighbor indexing algorithms; HNSW offers fast query speeds and high recall but requires relatively large memory.

65%
Verified

The RAG mechanism relies on the approximate nearest neighbor (ANN) search capability of vector databases (such as Pinecone, Weaviate, and Milvus) to achieve millisecond-level retrieval.

65%
Unverified

MaxKB通常集成PostgreSQL的pgvector扩展或独立的向量数据库

75%
Unverified

pgvector was first released in 2021, embedding high-dimensional vector storage and approximate nearest neighbor retrieval capabilities into PostgreSQL.

70%
Unverified

pgvector's README lists the HNSW default parameters: m is 16, ef_construction is 64, and hnsw.ef_search is 40, with higher values giving better recall but slower speed.

60%
Unverified

In the alpha version of pg_vectorsearch, filtered queries may return fewer rows than the LIMIT, because if a row passing the WHERE clause is not in the scanned sorted candidate set, the system will not continue searching (issue #188).

60%
Unverified

pgvector's advantage lies in transactional consistency between relational data and vector data in the same database, with no need to synchronize data between the business database and a vector database, simplifying architecture and operations.

60%
Unverified

In pgvector, <=>, <-> and <#> correspond to the three distance operators of cosine distance, Euclidean distance and inner product respectively, and the choice must be consistent with the training objective of the embedding model.

60%
Unverified

Mainstream vector databases such as Pinecone, Weaviate, Qdrant, and pgvector generally adopt the HNSW approximate nearest neighbor indexing algorithm at their core.

60%

Source Articles