Home / Companies / Neon / Blog / Post Details
Content Deep Dive

20x faster than pgvector: introducing pg_embedding extension for vector search in Postgres and LangChain

Blog post from Neon

Post Details
Company
Date Published
Author
Raouf Chebri
Word Count
1,654
Company Posts That Month
21
Language
English
Hacker News Points
-
Post removed?
No
Summary

The release of the pg_embedding extension for Postgres and LangChain introduces a significant enhancement in vector search capabilities, offering a 20-fold increase in speed with 99% accuracy using the Hierarchical Navigable Small Worlds (HNSW) index for approximate nearest neighbor search. While the existing pgvector extension with IVFFlat indexing has been popular, pg_embedding's graph-based approach in high-dimensional similarity search demonstrates superior efficiency. Benchmark tests using the GIST-960 Euclidean dataset show that pg_embedding with HNSW outperforms pgvector with IVFFlat in terms of search speed and accuracy, though it requires more memory due to its graph structure. This makes pg_embedding an ideal choice for applications prioritizing search speed and accuracy, while pgvector remains suitable for scenarios with strict memory constraints. Ultimately, the choice between the two should be guided by the specific requirements of the user’s application, with pg_embedding offering a powerful tool for efficient vector similarity searches in databases.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Vector Search 13 1,138 165 70 -23%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.