Optimizing Context-Enhanced Relational Joins
Viktor Sanca, Manos Chatzakis, Anastasia Ailamaki
Abstract
Collecting data, extracting value, and combining insights from relational and context-rich sources of many modalities in data processing pipelines presents a challenge for traditional relational DBMS. While relational operators enable declarative and optimizable query specification, they are limited to unsuitable data transformations for capturing or analyzing context. On the other hand, representation learning models can map context-rich data into embeddings, enabling machine-automated context processing but requiring imperative data transformation integration with the analytical query. We present a context-enhanced relational join operator to bridge this dichotomy and introduce an embedding operator composable with relational operators. This approach enables hybrid relational and context-rich vector data processing, with algebraic equivalences compatible with relational algebra and corresponding logical and physical optimizations. We investigate model-operator interaction with vector data processing and study the characteristics of the join operator. We demonstrate the hybrid context-enhanced relational join operators with vector embeddings and evaluate it against a vector database approach. We show step-by-step the impact of logical and physical optimizations, which result in orders of magnitude execution time improvement resulting in tensor join formulation. We also outline the performance tradeoffs and cases of using scan-based processing against vector indexes.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers3
- DARTH: Declarative Recall Through Early Termination for Approximate Nearest Neighbor SearchManos Chatzakis, Yannis Papakonstantinou, Themis PalpanasSIGMOD 2026 · 10 citations
- Exqutor: Extended Query Optimizer for Vector-Augmented Analytical QueriesHyunjoon Kim, Chaerim Lim, Hyeonjun An, Rathijit Sen et al.ICDE 2026 · 1 citation
- ANNiE: A Learned Query Cost Estimator for Graph-Based Approximate Nearest Neighbor SearchZeyu Wang, Manos Chatzakis, Qitong Wang, Themis Palpanas et al.VLDB 2026
Builds on4
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- Zero-Shot Cost Models for Out-of-the-box Learned Cost PredictionBenjamin Hilprecht, Carsten BinnigVLDB 2022 · 90 citations
- Query Processing on Tensor Computation RuntimesDong He, Supun Chathuranga Nakandala, Dalitso Banda, Rathijit Sen et al.VLDB 2022 · 54 citations
Related papers
- Ember: No-Code Context Enrichment via Similarity-Based Keyless JoinsSahaana Suri, Ihab F. Ilyas, Christopher Ré, Theodoros RekatsinasVLDB 2022 · 34 citations
- Creating Embeddings of Heterogeneous Relational Datasets for Data Integration TasksRiccardo Cappuzzo, Paolo Papotti, Saravanan ThirumuruganathanSIGMOD 2020 · 139 citations
- Query Embedding on Hyper-Relational Knowledge GraphsDimitrios Alivanistos, Max Berrendorf, Michael Cochez, Mikhail GalkinICLR 2022 · 29 citations
- CtxPipe: Context-aware Data Preparation Pipeline Construction for Machine LearningHaotian Gao, Shaofeng Cai, Tien Tuan Anh Dinh, Zhiyong Huang et al.SIGMOD 2025 · 7 citations
- Fast Approximate Similarity Join in Vector DatabasesJiadong Xie, Jeffrey Xu Yu, Yingfan LiuSIGMOD 2025 · 6 citations
