JOURNAL ARTICLE

Optimizing Nested Recursive Queries

Amir ShaikhhaDan SuciuMaximilian SchleichHung Q. Ngo

Year: 2024 Journal:   Proceedings of the ACM on Management of Data Vol: 2 (1)Pages: 1-27   Publisher: Association for Computing Machinery

Abstract

Datalog is a declarative programming language that has gained popularity in various domains due to its simplicity, expressiveness, and efficiency. But "pure" Datalog is limited to monotone queries, and cannot be used in most practical applications. For that reason, newer systems are relaxing the language by allowing non-monotone queries to be freely combined with recursion. But by departing from the elegant fixpoint semantics of pure datalog, these systems often result in inefficient query execution, for example they perform redundant computations, or use redundant storage. In this paper, we propose Temporel, a system that allows recursion to be freely combined with non-monotone operators. Temporel optimizes the program by compiling it into a novel intermediate representation that we call TempoDL. Our experimental results show that our system outperforms a state-of-the-art Datalog engine as well as a vectorized and a compiled in-memory database system for a wide range of applications from machine learning to graph processing.

Keywords:
Computer science Nested set model Theoretical computer science Information retrieval Relational database

Metrics

3
Cited By
2.51
FWCI (Field Weighted Citation Impact)
53
Refs
0.79
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Advanced Database Systems and Queries
Physical Sciences →  Computer Science →  Computer Networks and Communications
Data Management and Algorithms
Physical Sciences →  Computer Science →  Signal Processing
Graph Theory and Algorithms
Physical Sciences →  Computer Science →  Computer Vision and Pattern Recognition

Related Documents

BOOK-CHAPTER

Nested relations and recursive queries

Volker Linnemann

Lecture notes in computer science Year: 1989 Pages: 205-216
JOURNAL ARTICLE

Optimizing recursive queries in SQL

Carlos Ordońẽz

Year: 2005 Pages: 834-839
JOURNAL ARTICLE

Optimizing Recursive Queries with Progam Synthesis

Yisu Remy WangMahmoud Abo KhamisHung Q. NgoReinhard PichlerDan Suciu

Journal:   Proceedings of the 2022 International Conference on Management of Data Year: 2022 Pages: 79-93
JOURNAL ARTICLE

Optimizing differentially-maintained recursive queries on dynamic graphs

Khaled AmmarSiddhartha SahuSemih SalihoğluM. TAMER ÖZSU

Journal:   Proceedings of the VLDB Endowment Year: 2022 Vol: 15 (11)Pages: 3186-3198
© 2026 ScienceGate Book Chapters — All rights reserved.