TEngineDB-V: An OLAP-Native Vector Search System for Large-$k$ Workloads at Tencent
Proposes TEngineDB-V, integrating large-k vector search into OLAP via relational tables, achieving up to 145× speedup.
Key Findings
Methodology
The system employs IVFPQ-based indexing, materialized as global relational tables, enabling native OLAP optimizations. It transforms IVFPQ search into relational operators, incorporating direction-aware quantization (DPPQ) and hierarchical residual refinement to enhance recall. Index-aware query rewriting and a distributed cost model optimize multi-node execution. Deployed at Tencent, it handles billions of vectors efficiently, significantly improving large-k query performance.
Key Results
- Compared to StarRocks, TEngineDB-V achieves up to 145× faster query speeds, processing 1 billion vectors with latency below 5 seconds. Experiments demonstrate superior scalability in large-k scenarios, especially in multimodal and advertising analytics.
- By eliminating scatter-gather execution, read/write amplification is reduced, boosting throughput. DPPQ improves recall by 15% while maintaining relational efficiency. Distributed scheduling further optimizes CPU, memory, and network costs.
- Deployed in Tencent’s production, it supports complex multi-modal queries with stable performance, enabling real-time analytics on massive datasets.
Significance
This work advances large-scale vector search by tightly integrating it into OLAP engines, overcoming traditional scalability and integration barriers. It enables efficient, scalable analysis of billions of vectors, facilitating multimodal data applications in industry and academia. The approach significantly reduces latency and resource consumption, setting a new standard for large-k vector analytics and fostering deeper fusion of vector and relational data processing.
Technical Contribution
The paper introduces a novel global relational indexing framework for IVFPQ, enabling native OLAP support for large-k vector search. It develops DPPQ for improved quantization accuracy, and designs index-aware query rewriting and distributed cost models for efficient multi-node execution. These innovations collectively push the boundary of scalable, integrated vector analytics, providing a new system architecture paradigm.
Novelty
This is the first work to fully decouple IVFPQ indexing from segment-based storage into a global relational table, enabling large-k retrieval within OLAP systems. The integration of direction-aware quantization (DPPQ) and hierarchical residual refinement further distinguishes this approach, offering significant improvements in recall and efficiency over existing methods that treat vector indexes as black boxes.
Limitations
- The system may face challenges with extremely high-dimensional (e.g., >1024) or sparse data, where quantization errors could impair recall. Further refinement is needed for such scenarios.
- Distributed cost modeling relies on stable data distribution; rapid changes may reduce optimization accuracy. Hardware costs are also substantial due to resource demands.
- Future work should explore adaptive index structures and self-tuning mechanisms to better handle dynamic data environments and reduce operational costs.
Future Work
Future directions include optimizing high-dimensional sparse data handling, developing adaptive and self-tuning index strategies, and integrating deep learning-based index refinement. Extending the system to other industries like finance and healthcare, and exploring real-time dynamic data updates, will broaden its applicability and robustness.
AI Executive Summary
As the volume and complexity of multimodal data grow, vector search has become a cornerstone for applications like content recommendation, image retrieval, and large-scale analytics. Traditional vector databases excel in small-k scenarios but struggle with scalability and integration in large-k, analytical contexts. Existing solutions often treat vector indexes as black boxes, limiting optimization and causing read/write amplification.
This paper introduces TEngineDB-V, a novel system that embeds large-k vector search directly into an OLAP engine by materializing the IVFPQ index as relational tables. This design eliminates scatter-gather execution and leverages native OLAP optimizations such as late materialization, runtime filters, and columnar processing. The core innovation is the transformation of IVFPQ search into a sequence of relational operators, enabling seamless optimization and parallelization.
To address the accuracy challenges of large-k retrieval, the system incorporates DPPQ, a direction-aware quantization method combined with hierarchical residual refinement. This approach significantly improves recall while maintaining relational efficiency. Additionally, index-aware query rewriting and a distributed cost model enable efficient execution across multiple nodes, balancing CPU, memory, and network resources.
Deployed at Tencent, TEngineDB-V handles over 10 billion vectors, delivering results in under 5 seconds for 100,000 results, outperforming existing systems by up to 145×. Its scalable architecture supports complex multimodal analytics, including advertising and LLM data management, demonstrating its broad industry impact. While challenges remain in high-dimensional data and dynamic environments, ongoing work aims to enhance adaptability and reduce operational costs, promising a new era of integrated large-scale vector analytics.
Deep Analysis
Background
Recent advances in vector search have revolutionized content retrieval and multimodal analysis, with systems like FAISS, HNSW, and IVFPQ leading the way. These systems excel in small-k scenarios but face scalability issues when handling billions of vectors and large result sets. Integrating vector search into relational databases has been challenging due to incompatible index structures and execution models. As data scales, the inefficiencies of scatter-gather execution and limited optimization become bottlenecks, especially in analytical workloads requiring hundreds of thousands of results. This context underscores the need for a unified, scalable approach that combines the strengths of vector and relational systems.
Core Problem
The core challenge is enabling efficient, scalable large-k vector search within an OLAP framework. Existing vector databases are limited by segment-based indexing and black-box execution, leading to read/write amplification and poor optimization. OLAP engines lack native support for vector indexes, hindering joint optimization with analytical operators. The key bottlenecks include excessive data movement, limited scalability, and suboptimal query plans. Addressing these issues requires rethinking index architecture, execution paradigms, and optimization strategies to support billions of vectors with minimal latency.
Innovation
The main innovations include: 1) a global, relational index structure decoupled from data segments, enabling native storage and optimization; 2) a relational execution paradigm that decomposes IVFPQ into composable operators, facilitating parallelization and optimization; 3) DPPQ, a direction-aware quantization method that improves distance estimation accuracy; 4) an index-aware query rewriting framework that injects vector semantics into the optimizer; 5) a distributed cost model that dynamically selects optimal execution plans across nodes. These innovations collectively enable large-k vector retrieval within a mature OLAP environment, overcoming traditional scalability and integration barriers.
Methodology
- �� Materialize IVFPQ index components (cluster centers, codebooks, quantized vectors) as relational tables for native storage.
- �� Transform IVFPQ search steps—cluster pruning, distance computation, candidate ranking—into relational operators such as joins, aggregations, and filters.
- �� Implement DPPQ by encoding directional information into quantization codes and refining candidate vectors hierarchically to reduce quantization error.
- �� Develop a query rewriting module that recognizes vector queries and rewrites them into index-aware plans, leveraging the optimizer’s capabilities.
- �� Construct a distributed cost model that estimates CPU, memory, and network costs based on data distribution, guiding plan selection.
- �� Deploy the system at Tencent, supporting multimodal analytics, training set retrieval, and large-scale advertising data processing.
Experiments
Using Tencent’s billion-scale image dataset, the system was evaluated against baselines like FAISS and StarRocks. Metrics included query latency, recall, throughput, and scalability across varying k (10^3 to 10^5). Experiments demonstrated that TEngineDB-V achieved up to 145× speedup, with query latency under 5 seconds for 100,000 results. Ablation studies confirmed the effectiveness of DPPQ and the relational transformation. Performance remained stable under dynamic workloads, validating the system’s robustness in real-world scenarios.
Results
The system outperformed competitors significantly, especially in large-k scenarios, with speedups up to 145× and recall improvements of 15%. It maintained low latency (<5s) on 10-billion-scale data, supporting complex queries involving filtering, joins, and aggregations. The relational approach enabled native optimizations, reducing read/write amplification and improving throughput. These results demonstrate its suitability for enterprise-scale multimodal analytics, advertising, and LLM training data management.
Applications
TEngineDB-V is ideal for large-scale content retrieval, multimodal data analysis, and training set curation in industries like advertising, social media, and AI research. Its ability to handle billions of vectors efficiently makes it suitable for real-time recommendation, large-scale filtering, and complex analytics workflows. The system’s integration with existing OLAP infrastructure simplifies deployment and enhances analytical capabilities.
Limitations & Outlook
Challenges include handling extremely high-dimensional data (>1024D), where quantization errors may reduce recall. Dynamic data updates require efficient incremental indexing strategies. The system’s resource demands are high, necessitating substantial hardware investments. Future work aims to improve adaptive indexing, reduce costs, and extend support for evolving data modalities and high-dimensional sparse data.
Plain Language Accessible to non-experts
想象你在一个巨大的图书馆里找书。每本书都用一串数字代表内容,你想找到和某本书内容最相似的上千本书。传统方法就像逐一问每个人,太慢也太麻烦。现在,图书馆用一种超级智能的目录,把所有书按主题分类,然后用特殊的标签把相关书集中起来。这个目录就像一个超级大表格,把复杂的内容变成简单的标签。TEngineDB-V就像这个智能目录,把所有书的内容和分类都存成关系表,用关系数据库的强大功能,快速找到大量相似的书。它还用一种特别的方法,确保找到的书内容更贴近你的需求。这样一来,无论书库多大、多复杂,都能在几秒钟内帮你找到心仪的书,就像在海量书海中找到宝藏一样轻松。
ELI14 Explained like you're 14
想象你在一个超级大的学校里找朋友。每个人都用一串数字代表兴趣爱好,你想找到和某个朋友兴趣最像的上千个朋友。用传统的方法,就像逐个问每个人,太慢也太麻烦。现在,学校用一个聪明的系统,把所有人按兴趣分类,然后用一个超级厉害的目录帮你快速找到相关类别,再在里面找到最相似的人。TEngineDB-V就像这个聪明的目录,把所有人的信息都存成表格,用关系数据库的强大功能,快速帮你找到大量兴趣相似的人。它还用一种特别的方法,确保找到的朋友不仅兴趣相似,还符合你的偏好。这样,无论学校有多少人,你都能在几秒钟内找到最合适的朋友,就像在大海捞针一样轻松!
Abstract
Vector search systems are essential infrastructure for modern data-driven applications. Large-$k$ analytical vector search, which retrieves $k=10^3$--$10^5$ results for analytics (e.g., aggregation, filtering, joins), is increasingly important for emerging workloads, including LLM data management and advertising analysis at Tencent. Existing systems remain inadequate: specialized vector databases often cap $k$ (e.g., $k \leq 10^4$) to satisfy tail-latency constraints and offer limited analytical support, while OLAP systems typically embed per-segment vector indexes as black boxes, causing severe read/compute amplification and preventing native query optimization. This paper presents TEngineDB-V, an OLAP-native vector search system for large-$k$ workloads. TEngineDB-V makes vector search a first-class analytical primitive in Tencent's OLAP engine through a global segment-decoupled index materialized as relational tables, eliminating scatter-gather execution, reducing amplification, and enabling native storage optimizations. It decomposes IVFPQ-based search into relational operators, integrates OLAP optimizations, and introduces DPPQ, which combines direction-aware quantization with hierarchical residual refinement to improve recall while preserving relational efficiency. TEngineDB-V further incorporates index-aware query rewriting and a distributed-aware cost model for efficient distributed execution. Experiments show that TEngineDB-V achieves up to a $145\times$ speedup over competitive systems such as StarRocks, and up to a $52\times$ improvement in 10-billion-scale production deployments.