
AlloyDB ScaNN four-level tree scales vector search to 10B vectors

AlloyDB, Google’s fully managed PostgreSQL-compatible database service, has extended its ScaNN vector index to operate at a scale of 10 billion vectors. The key architectural change is a new four-level tree structure, currently in preview, which replaces the earlier two- and three-level tree configurations. According to Google’s internal performance tests, AlloyDB with the ScaNN index can achieve 95% recall and p95 latency of 51 ms or less at 10 billion vectors.
The move to this scale was driven by the needs of enterprise-grade agentic AI workloads, where vector databases must handle billions of vectors. Previous AlloyDB ScaNN tree-based indexes were limited to two- or three-level configurations, and scaling those structures created two main bottlenecks. First, larger tree structures demanded significantly more compute for both index construction and query traversal. Second, the sampling processes required for 10 billion vectors could exceed the system’s available memory.
The four-level tree architecture addresses these problems with a top-down strategy that balances accuracy and build efficiency. Key enhancements include Top-K branch selection, SOAR, centroid adjustment, and a balanced tree shape. The design provides two primary benefits. The first is reduced compute intensity via hierarchical partitioning: instead of traversing a flat or poorly segmented space, the multi-layered hierarchy narrows the search path exponentially. Search complexity drops from O(N^1/2) for a two-level tree and O(N^1/3) for a three-level tree to O(N^1/4) for the four-level tree, enabling support for more than 10 billion vectors. The second benefit is efficient memory usage. The balanced tree configuration sidesteps memory limits that constrain training dataset size, and when memory limitations are encountered, the system generates a condensed sampling set that still accounts for performance and accuracy.
The reported performance results come from Google’s internal tests, and the four-level tree is explicitly described as a preview feature. The post points readers to a quickstart guide for deploying ScaNN for AlloyDB, the official ScaNN documentation for optimized high-speed vector search, and a 30-day free trial for new users.


