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

On-disk HNSW index for Postgres with pg_embedding

Blog post from Neon

Post Details
Company
Date Published
Author
Mahmoud Abdelwahab
Word Count
1,058
Language
English
Hacker News Points
-
Summary

The latest update to pg_embedding, a Postgres extension, introduces enhancements such as on-disk HNSW indexing, which allows for faster and more accurate vector similarity searches compared to traditional methods. With support for cosine similarity, Manhattan, and Euclidean distances, the extension eliminates the need for external vector stores in AI and LLM applications, making it easier to manage vector embeddings directly within Postgres. Additionally, the integration with Neon's serverless architecture enables automatic scaling, cost efficiency, and reduced query latencies, leveraging features like autoscaling and regional read replicas to handle read-heavy workloads effectively. Despite the trade-off in performance between in-memory and on-disk indices, the on-disk implementation facilitates scalable application development by optimizing resource utilization. Users are encouraged to explore the extension's new capabilities, which are designed to enhance the scalability and efficiency of AI applications on the Neon platform.