AlloyDB boosts pgvector HNSW vector search speed by 4x
AlloyDB introduces columnar engine accelerated HNSW for pgvector, achieving up to 4x higher queries per second (QPS) for vector search compared to standard PostgreSQL. This enhancement is crucial for enterprise AI applications that require maximizing QPS without sacrificing search accuracy. The feature is now available in preview for demanding workloads and requires no application code changes.
- →Columnar engine accelerated HNSW for pgvector in AlloyDB
- →Improved performance through in-memory columnar cache and vectorized access
- →Columnar engine accelerated HNSW offers cost and quality benefits
- →AlloyDB provides flexibility with multiple vector index options
- →Steps to enable and use columnar engine accelerated HNSW
Features (1) ›
- Columnar engine accelerated HNSW for pgvector in AlloyDB
AlloyDB now offers columnar engine accelerated HNSW, a feature designed to significantly improve vector search performance for pgvector. This enhancement provides up to 4x higher QPS compared to standard PostgreSQL HNSW, while maintaining or improving search recall.
Enhancements (1) ›
- Improved performance through in-memory columnar cache and vectorized access
The columnar engine stores frequently accessed index data in an optimized, in-memory columnar format. This bypasses standard PostgreSQL buffer manager overhead and uses a vectorized memory layout for faster traversals, leading to substantial QPS and recall gains.
Notes (3) ›
- Columnar engine accelerated HNSW offers cost and quality benefits
This feature allows for reduced infrastructure costs by achieving higher performance with fewer compute resources. It also enables AI applications to attain better search accuracy at speeds previously only possible for lower-quality searches, with no application code modifications needed.
- AlloyDB provides flexibility with multiple vector index options
Beyond HNSW, AlloyDB also supports ScaNN, a Google Research-backed index, and standard k-nearest neighbor (KNN) search for use cases requiring absolute precision and 100% recall.
- Steps to enable and use columnar engine accelerated HNSW
To utilize this feature, users need to enable the google_columnar_engine.enabled and google_columnar_engine.enable_index_caching flags. After creating an HNSW index via pgvector, a specific SQL command caches the index within the columnar engine.
https://cloud.google.com/blog/products/databases/supercharge-pgvector-4x-faster-hnsw-with-alloydb/
Related releases
- Config Connector 1.154.1 Adds New Alpha Resources and Field Support Google Cloud release notes ·
- Security Command Center: Data Residency & Agent Vulnerability Scanning Preview Google Cloud release notes ·
- Cloud SQL for PostgreSQL: Private Service Connect changes August 2026 Google Cloud release notes ·
- Cloud SQL for SQL Server: Private Service Connect connection behavior changes Google Cloud release notes ·
- Cloud SQL for MySQL: Private Service Connect and QueryData Updates Google Cloud release notes ·
- Cloud SQL for PostgreSQL: Faster CMEK Re-encryption Google Cloud release notes ·