Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3665225.3665447acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
short-paper
Open access

Constrained Quadratic Model for Optimizing Join Orders

Published: 29 June 2024 Publication History

Abstract

We present a quantum-based approach for the optimization of join orders in database applications. Our approach relies on a hybrid framework, where classical heuristics are combined with a quantum processor to accelerate the search over the set of solutions to a constrained problem. By taking advantage of a previously introduced formulation of the join order optimization as a Quadratic Unconstrained Binary Optimization (QUBO) problem, we implement it using the Constrained Quadratic Model (CQM), a hybrid classical-quantum solver that interfaces classical heuristics with D-Wave’s quantum annealer. We show that even a generic implementation of this classical-quantum hybrid framework produces competitive results for the join order problem, suggesting that better-tailored hybrid solvers could produce a computational advantage.

References

[1]
F Barahona. 1982. On the computational complexity of Ising spin glass models. Journal of Physics A: Mathematical and General 15, 10 (oct 1982), 3241. https://doi.org/10.1088/0305-4470/15/10/028
[2]
Kishor Bharti, Alba Cervera-Lierta, Thi Ha Kyaw, Tobias Haug, Sumner Alperin-Lea, Abhinav Anand, Matthias Degroote, Hermanni Heimonen, Jakob S. Kottmann, Tim Menke, Wai-Keong Mok, Sukin Sim, Leong-Chuan Kwek, and Alán Aspuru-Guzik. 2022. Noisy intermediate-scale quantum algorithms. Rev. Mod. Phys. 94 (Feb 2022), 015004. Issue 1. https://doi.org/10.1103/RevModPhys.94.015004
[3]
Tim Bittner and Sven Groppe. 2020. Avoiding Blocking by Scheduling Transactions using Quantum Annealing. In IDEAS.
[4]
Nicolas Bruno, César Galindo-Legaria, and Milind Joshi. 2010. Polynomial heuristics for query optimization. In 2010 IEEE 26th International Conference on Data Engineering (ICDE 2010). 589–600. https://doi.org/10.1109/ICDE.2010.5447916
[5]
Tianyi Chen, Jun Gao, Hedui Chen, and Yaofeng Tu. 2023. LOGER: A Learned Optimizer Towards Generating Efficient and Robust Query Execution Plans. Proc. VLDB Endow. 16, 7 (mar 2023), 1777–1789. https://doi.org/10.14778/3587136.3587150
[6]
Sophie Cluet and Guido Moerkotte. 1995. On the complexity of generating optimal left-deep processing trees with cross products. In Database Theory — ICDT ’95, Georg Gottlob and Moshe Y. Vardi (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 54–67.
[7]
[7] D-Wave Leap’s Hybrid Solvers. 2024. https://docs.dwavesys.com/docs/latest/doc_leap_hybrid.html.
[8]
[8] D-Wave documentation. 2024. https://docs.dwavesys.com/docs/latest/c_gs_4.html.
[9]
L. Doshi 2023. Kepler: Robust Learning for Parametric Query Optimization. In SIGMOD.
[10]
Tobias Fankhauser, Marc E. Solèr, Rudolf M. Füchslin, and Kurt Stockinger. 2021. Multiple Query Optimization using a Hybrid Approach of Classical and Quantum Computing. CoRR abs/2107.10508 (2021). arXiv:2107.10508https://arxiv.org/abs/2107.10508
[11]
Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. 2014. A Quantum Approximate Optimization Algorithm. arxiv:1411.4028 [quant-ph]
[12]
Sven Groppe and Jinghua Groppe. 2021. Optimizing Transaction Schedules on Universal Quantum Computers via Code Generation for Grover’s Search Algorithm. In Proceedings of the 25th International Database Engineering & Applications Symposium (Montreal, QC, Canada) (IDEAS ’21). Association for Computing Machinery, New York, NY, USA, 149–156. https://doi.org/10.1145/3472163.3472164
[13]
Jorng-Tzong Horng, Cheng-Yan Kao, and Baw-Jhiune Liu. 1994. A genetic algorithm for database query optimization. In Proceedings of the First IEEE Conference on Evolutionary Computation. IEEE World Congress on Computational Intelligence. 350–355 vol.1. https://doi.org/10.1109/ICEC.1994.349926
[14]
Hybrid Solver for Constrained Quadratic Models [WhitePaper]. 2021. https://www.dwavesys.com/media/rldh2ghw/14-1055a-a_hybrid_solver_for_constrained_quadratic_models.pdf.
[15]
Y. E. Ioannidis and Younkyung Kang. 1990. Randomized algorithms for optimizing large join queries. SIGMOD Rec. 19, 2 (may 1990), 312–321. https://doi.org/10.1145/93605.98740
[16]
M. W. Johnson, M. H. S. Amin, S. Gildert, T. Lanting, F. Hamze, N. Dickson, R. Harris, A. J. Berkley, J. Johansson, P. Bunyk, E. M. Chapple, C. Enderud, J. P. Hilton, K. Karimi, E. Ladizinsky, N. Ladizinsky, T. Oh, I. Perminov, C. Rich, M. C. Thom, E. Tolkacheva, C. J. S. Truncik, S. Uchaikin, J. Wang, B. Wilson, and G. Rose. 2011. Quantum annealing with manufactured spins. Nature 473, 7346 (2011), 194–198. https://doi.org/10.1038/nature10012
[17]
Tadashi Kadowaki and Hidetoshi Nishimori. 1998. Quantum annealing in the transverse Ising model. Phys. Rev. E 58 (Nov 1998), 5355–5363. Issue 5. https://doi.org/10.1103/PhysRevE.58.5355
[18]
Viktor Leis, Andrey Gubichev, Atanas Mirchev, Peter Boncz, Alfons Kemper, and Thomas Neumann. 2015. How Good Are Query Optimizers, Really?Proc. VLDB Endow. 9, 3 (nov 2015), 204–215. https://doi.org/10.14778/2850583.2850594
[19]
Viktor Leis, Bernhard Radke, Andrey Gubichev, Atanas Mirchev, Peter Boncz, Alfons Kemper, and Thomas Neumann. 2018. Query optimization through the looking glass, and what we found running the Join Order Benchmark. The VLDB Journal 27, 5 (oct 2018), 643–668. https://doi.org/10.1007/s00778-017-0480-7
[20]
Andrew Lucas. 2014. Ising formulations of many NP problems. Frontiers in Physics 2 (2014). https://doi.org/10.3389/fphy.2014.00005
[21]
R. Marcus 2021. Bao: Making Learned Query Optimization Practical. In SIGMOD.
[22]
Ryan Marcus, Parimarjan Negi, Hongzi Mao, Chi Zhang, Mohammad Alizadeh, Tim Kraska, Olga Papaemmanouil, and Nesime Tatbul. 2019. Neo: A Learned Query Optimizer. Proc. VLDB Endow. 12, 11 (jul 2019), 1705–1718. https://doi.org/10.14778/3342263.3342644
[23]
Ryan Marcus and Olga Papaemmanouil. 2018. Deep Reinforcement Learning for Join Order Enumeration. In Proceedings of the First International Workshop on Exploiting Artificial Intelligence Techniques for Data Management (Houston, TX, USA) (aiDM’18). Association for Computing Machinery, New York, NY, USA, Article 3, 4 pages. https://doi.org/10.1145/3211954.3211957
[24]
Guido Moerkotte and Thomas Neumann. 2008. Dynamic programming strikes back. In Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data (Vancouver, Canada) (SIGMOD ’08). Association for Computing Machinery, New York, NY, USA, 539–552. https://doi.org/10.1145/1376616.1376672
[25]
Nitin Nayak, Jan Rehfeld, Tobias Winker, Benjamin Warnke, Umut Çalikyilmaz, and Sven Groppe. 2023. Constructing Optimal Bushy Join Trees by Solving QUBO Problems on Quantum Hardware and Simulators. In Proceedings of the International Workshop on Big Data in Emergent Distributed Environments(BiDEDE ’23). Association for Computing Machinery, New York, NY, USA, Article 7, 7 pages. https://doi.org/10.1145/3579142.3594298
[26]
Thomas Neumann. 2009. Query simplification: graceful degradation for join-order optimization. In Proceedings of the 2009 ACM SIGMOD International Conference on Management of Data (Providence, Rhode Island, USA) (SIGMOD ’09). Association for Computing Machinery, New York, NY, USA, 403–414. https://doi.org/10.1145/1559845.1559889
[27]
Thomas Neumann and Bernhard Radke. 2018. Adaptive Optimization of Very Large Join Queries. In Proceedings of the 2018 International Conference on Management of Data (Houston, TX, USA) (SIGMOD ’18). Association for Computing Machinery, New York, NY, USA, 677–692. https://doi.org/10.1145/3183713.3183733
[28]
Manuel Schönberger, Stefanie Scherzinger, and Wolfgang Mauerer. 2023. Ready to Leap (by Co-Design)? Join Order Optimisation on Quantum Hardware. Proc. ACM Manag. Data 1, 1, Article 92 (may 2023), 27 pages. https://doi.org/10.1145/3588946
[29]
Manuel Schönberger, Immanuel Trummer, and Wolfgang Mauerer. 2023. Quantum-Inspired Digital Annealing for Join Ordering. In VLDB.
[30]
Manuel Schönberger, Immanuel Trummer, and Wolfgang Mauerer. 2023. Quantum Optimisation of General Join Trees. In Joint Proceedings of Workshops at the 49th International Conference on Very Large Data Bases (VLDB 2023), Vancouver, Canada, August 28 - September 1, 2023(CEUR Workshop Proceedings, Vol. 3462). CEUR-WS.org. https://ceur-ws.org/Vol-3462/QDSM2.pdf
[31]
P. Griffiths Selinger, M. M. Astrahan, D. D. Chamberlin, R. A. Lorie, and T. G. Price. 1979. Access path selection in a relational database management system. In Proceedings of the 1979 ACM SIGMOD International Conference on Management of Data (Boston, Massachusetts) (SIGMOD ’79). Association for Computing Machinery, New York, NY, USA, 23–34. https://doi.org/10.1145/582095.582099
[32]
A. Swami. 1989. Optimization of large join queries: combining heuristics and combinatorial techniques. In Proceedings of the 1989 ACM SIGMOD International Conference on Management of Data (Portland, Oregon, USA) (SIGMOD ’89). Association for Computing Machinery, New York, NY, USA, 367–376. https://doi.org/10.1145/67544.66961
[33]
Arun Swami and Anoop Gupta. 1988. Optimization of large join queries. SIGMOD Rec. 17, 3 (jun 1988), 8–17. https://doi.org/10.1145/971701.50203
[34]
The D-Wave Advantage System [WhitePaper]. 2022. https://www.dwavesys.com/media/3xvdipcn/14-1058a-a_advantage_processor_overview.pdf.
[35]
Immanuel Trummer and Christoph Koch. 2016. Multiple Query Optimization on the D-Wave 2X Adiabatic Quantum Computer. In VLDB.
[36]
Immanuel Trummer and Christoph Koch. 2017. Solving the Join Ordering Problem via Mixed Integer Linear Programming. In Proceedings of the 2017 ACM International Conference on Management of Data (Chicago, Illinois, USA) (SIGMOD ’17). Association for Computing Machinery, New York, NY, USA, 1025–1040. https://doi.org/10.1145/3035918.3064039
[37]
Bennet Vance and David Maier. 1996. Rapid bushy join-order optimization with Cartesian products. In Proceedings of the 1996 ACM SIGMOD International Conference on Management of Data (Montreal, Quebec, Canada) (SIGMOD ’96). Association for Computing Machinery, New York, NY, USA, 35–46. https://doi.org/10.1145/233269.233317
[38]
Tobias Winker, Umut Çalikyilmaz, Le Gruenwald, and Sven Groppe. 2023. Quantum Machine Learning for Join Order Optimization using Variational Quantum Circuits. In Proceedings of the International Workshop on Big Data in Emergent Distributed Environments (, Seattle, WA, USA, ) (BiDEDE ’23). Association for Computing Machinery, New York, NY, USA, Article 5, 7 pages. https://doi.org/10.1145/3579142.3594299
[39]
Z. Yang 2022. Balsa: Learning a Query Optimizer Without Expert Demonstrations. In SIGMOD.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
Q-Data '24: Proceedings of the 1st Workshop on Quantum Computing and Quantum-Inspired Technology for Data-Intensive Systems and Applications
June 2024
48 pages
ISBN:9798400705533
DOI:10.1145/3665225
This work is licensed under a Creative Commons Attribution International 4.0 License.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 29 June 2024

Check for updates

Author Tags

  1. Constrained Quadratic Model
  2. Join Order
  3. Quadratic Unconstrained Binary Optimization
  4. Quantum Computing
  5. Query Optimization

Qualifiers

  • Short-paper
  • Research
  • Refereed limited

Conference

SIGMOD/PODS '24
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 119
    Total Downloads
  • Downloads (Last 12 months)119
  • Downloads (Last 6 weeks)47
Reflects downloads up to 04 Oct 2024

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media