Optimizing Disjunctive Queries with Tagged Execution
Albert Kim, Samuel Madden
Abstract
Despite decades of research into query optimization, optimizing queries with disjunctive predicate expressions remains a challenge. Solutions employed by existing systems (if any) are often simplistic and lead to much redundant work being performed by the execution engine. To address these problems, we propose a novel form of query execution called tagged execution. Tagged execution groups tuples into subrelations based on which predicates in the query they satisfy (or don't satisfy) and tags them with that information. These tags then provide additional context for query operators to take advantage of during runtime, allowing them to eliminate much of the redundant work performed by traditional engines and realize predicate pushdown optimizations for disjunctive predicates. However, tagged execution brings its own challenges, and the question of what tags to create is a nontrivial one. Careless creation of tags can lead to an exponential blowup in the tag space, with the overhead outweighing the benefits. To address this issue, we present a technique called tag generalization to minimize the space of tags. We implemented the tagged execution model with tag generalization in our system Basilisk, and our evaluation showed an average 2.7× speedup in runtime over the traditional execution model with up to a 19× speedup in certain situations.
1 We take a few liberties with the attribute names and predicate expressions in this example to improve brevity and clarity.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
Builds on1
Related papers
- PLAQUE: Automated Predicate Learning at Query TimeYiming Lin, Sharad MehrotraSIGMOD 2024 · 2 citations
- Accelerate Distributed Joins with Predicate TransferYifei Yang, Xiangyao YuSIGMOD 2025
- Pushing Data-Induced Predicates Through Joins in Big-Data ClustersLaurel J. Orr, Srikanth Kandula, Surajit ChaudhuriVLDB 2020 · 35 citations
- Bonsai: Compiling Queries to Pruned Tree TraversalsAlexander J. Root, Christophe Gyurgyik, Purvi Goel, Kayvon Fatahalian et al.PLDI 2026
- Vertex-centric Parallel Computation of SQL QueriesAinur Smagulova, Alin DeutschSIGMOD 2021 · 1 citation
