Scaling Package Queries to a Billion Tuples via Hierarchical Partitioning and Customized Optimization
Anh L. Mai, Pengyu Wang, Azza Abouzied, Matteo Brucato, Peter J. Haas, Alexandra Meliou
Abstract
A package query returns a package---a multiset of tuples---that maximizes or minimizes a linear objective function subject to linear constraints, thereby enabling in-database decision support. Prior work has established the equivalence of package queries to Integer Linear Programs (ILPs) and developed the SketchRefine algorithm for package query processing. While this algorithm was an important first step toward supporting prescriptive analytics scalably inside a relational database, it struggles when the data size grows beyond a few hundred million tuples or when the constraints become very tight. In this paper, we present Progressive Shading, a novel algorithm for processing package queries that can scale efficiently to billions of tuples and gracefully handle tight constraints. Progressive Shading solves a sequence of optimization problems over a hierarchy of relations, each resulting from an ever-finer partitioning of the original tuples into homogeneous groups until the original relation is obtained. This strategy avoids the premature discarding of high-quality tuples that can occur with SketchRefine. Our novel partitioning scheme, Dynamic Low Variance, can handle very large relations with multiple attributes and can dynamically adapt to both concentrated and spread-out sets of attribute values, provably outperforming traditional partitioning schemes such as kd-tree. We further optimize our system by replacing our off-the-shelf optimization software with customized ILP and LP solvers, called Dual Reducer and Parallel Dual Simplex respectively, that are highly accurate and orders of magnitude faster.
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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext fd8ca0ca-1022-45aa-a49d-2396a3a50615Cited by top-tier papers4
- Query Refinement for Diverse Top-k SelectionFelix S. Campbell, Alon Silberstein, Julia Stoyanovich, Yuval MoskovitchSIGMOD 2024 · 6 citations
- Is Integer Linear Programming All You Need for Deletion Propagation? A Unified and Practical Approach for Generalized Deletion PropagationNeha Makhija, Wolfgang GatterbauerVLDB 2025 · 3 citations
- Decisionhouse: Prescriptive Analytics in the Data StackMatteo Brucato, Fjodor Kholodkov, Soren Little, Jakob Mayer et al.VLDB 2026 · 2 citations
- Stochastic SketchRefine: Scaling In-Database Decision-Making under Uncertainty to Millions of TuplesRiddho R. Haque, Anh L. Mai, Matteo Brucato, Azza Abouzied et al.VLDB 2025 · 1 citation
Builds on2
- Solving Large-Scale Granular Resource Allocation Problems Efficiently with POPDeepak Narayanan, Fiodar Kazhamiaka, Firas Abuzaid, Peter Kraft et al.SOSP 2021 · 56 citations
- Query Processing on Tensor Computation RuntimesDong He, Supun Chathuranga Nakandala, Dalitso Banda, Rathijit Sen et al.VLDB 2022 · 54 citations
Related papers
- Stochastic Package Queries in Probabilistic DatabasesMatteo Brucato, Nishant Yadav, Azza Abouzied, Peter J. Haas et al.SIGMOD 2020 · 6 citations
- Prefix-Cache-Aware Data Reordering for LLM-Augmented Database AnalyticsYingze Li, dong wang, Yiming Guo, Yao Chen et al.ICML 2026
- DEPA-Delta Shifting and Distribution Shaping for Efficient Adaptive IndexingAhmad Khazaie, Holger PirkICDE 2025
- Determining Exact Quantiles with Randomized SummariesZiling Chen, Haoquan Guan, Shaoxu Song, Xiangdong Huang et al.SIGMOD 2024 · 3 citations
- Simplifying dependent reductions in the polyhedral modelCambridge Yang, Eric Atkinson, Michael CarbinPOPL 2021 · 5 citations
