SQLVec: SQL-Based Vector Similarity Search
Zhequn Zhang, Yuanyuan Zhu, Hao Zhang, Jeffrey Xu Yu
Abstract
Vector data is ubiquitous in many applications, primarily due to the advances in deep learning that enable the representation of diverse data types as vectors. A number of vector databases have been developed to support efficient vector similarity search, and they are generally categorized into two types: specialized and generalized. The latter are gaining increasing interest as they can eliminate data silos and support complex query processing for both vector and non-vector data. However, these systems, built on specific databases, must construct and access vector indices via low-level, database-specific APIs. This requires substantial engineering effort and hinders their migration to alternative databases. In this paper, for the first time, we study whether vector similarity search can be efficiently mapped into SQL, which is independent of the underlying databases and naturally portable across relational databases. We propose a general framework SQLVec, which decomposes the vector search process into a set of atomic operators to support different variants of search tasks flexibly. We map these operators to efficient SQL statements and then further optimize them on search strategies and distance computations to accelerate vector search across various scenarios. We deployed our framework SQLVec on two representative relational databases, and conducted extensive evaluation to compare it with existing vector databases extended from them. Our experimental results demonstrate the portability of SQLVec across relational databases and show that it matches or outperforms existing systems on diverse vector search variants.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 3bb3b95e-a6a0-46ab-8115-42d95c96abdaRelated papers
- Are There Fundamental Limitations in Supporting Vector Data Management in Relational Databases? A Case Study of PostgreSQLYunan Zhang, Shige Liu, Jianguo WangICDE 2024 · 26 citations
- Fast Approximate Similarity Join in Vector DatabasesJiadong Xie, Jeffrey Xu Yu, Yingfan LiuSIGMOD 2025 · 6 citations
- Integrating Vector Databases across Embedding ModelsBeining Yang, Yang Cao, Yang RenSIGMOD 2026 · 3 citations
- VBASE: Unifying Online Vector Similarity Search and Relational Queries via Relaxed MonotonicityQianxi Zhang, Shuotao Xu, Qi Chen, Guoxin Sui et al.OSDI 2023 · 75 citations
- Text2VectorSQL: Towards a Unified Interface for Vector Search and SQL QueriesZhengren Wang, Dongwen Yao, Bozhou Li, Dongsheng Ma et al.ICDE 2026 · 1 citation
