skip to main content
10.1145/3663742.3663974acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
short-paper

Low Rank Approximation for Learned Query Optimization

Published:09 June 2024Publication History

ABSTRACT

We present LimeQO, a learned steering query optimizer based on linear methods, such as matrix completion, for repetitive workloads. LimeQO can forgo expensive neural networks by taking advantage of the low-rank structure of query workloads. Using offline execution, LimeQO can accelerate workloads by up to 2x with zero regressions in just a few hours, while using 100-1000x fewer computational resources than deep learning techniques.

References

  1. [n.d.]. PostgreSQL Database, http://www.postgresql.org/. ([n. d.]).Google ScholarGoogle Scholar
  2. Christoph Anneser, Nesime Tatbul, David Cohen, Zhenggang Xu, Prithvi Pandian, Nikolay Leptev, and Ryan Marcus. 2023. AutoSteer: Learned Query Optimization for Any SQL Database. PVLDB 14, 1 (Aug. 2023). https://doi.org/10.14778/3611540.3611544Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Emmanuel J. Candes and Terence Tao. 2009. The Power of Convex Relaxation: Near-Optimal Matrix Completion. http://arxiv.org/abs/0903.1476arXiv:0903.1476 [cs, math].Google ScholarGoogle Scholar
  4. Emmanuel J. Candès and Benjamin Recht. 2009. Exact Matrix Completion via Convex Optimization. Foundations of Computational Mathematics 9, 6 (Dec. 2009), 717--772. https://doi.org/10.1007/s10208-009-9045-5Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Tianyi Chen, Jun Gao, Hedui Chen, and Yaofeng Tu. 2023. LOGER: A Learned Optimizer Towards Generating Efficient and Robust Query Execution Plans. Proceedings of the VLDB Endowment 16, 7 (March 2023), 1777--1789. https://doi.org/10.14778/3587136.3587150Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Eli Cortez, Anand Bonde, Alexandre Muzio, Mark Russinovich, Marcus Fontoura, and Ricardo Bianchini. 2017. Resource Central: Understanding and Predicting Workloads for Improved Resource Management in Large Cloud Platforms. In Proceedings of the 26th Symposium on Operating Systems Principles (SOSP '17). Association for Computing Machinery, New York, NY, USA, 153--167. https://doi.org/10.1145/3132747.3132772Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. David Goldberg, David Nichols, Brian M Oki, and Douglas Terry. 1992. Using collaborative filtering to weave an information tapestry. Commun. ACM 35, 12 (1992), 61--70.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Trevor Hastie, Rahul Mazumder, Jason Lee, and Reza Zadeh. 2014. Matrix Completion and Low-Rank SVD via Fast Alternating Least Squares. arXiv:1410.2596 [stat.ME]Google ScholarGoogle Scholar
  9. Amin Kamali, Verena Kantere, Calisto Zuzarte, and Vincent Corvinelli. 2024. Roq: Robust Query Optimization Based on a Risk-aware Learned Cost Model. (2024). https://doi.org/10.48550/ARXIV.2401.15210Google ScholarGoogle ScholarCross RefCross Ref
  10. Diederik P. Kingma and Jimmy Ba. 2015. Adam: A Method for Stochastic Optimization. In 3rd International Conference for Learning Representations (ICLR '15). San Diego, CA.Google ScholarGoogle Scholar
  11. Sanjay Krishnan, Zongheng Yang, Ken Goldberg, Joseph Hellerstein, and Ion Stoica. 2018. Learning to Optimize Join Queries With Deep Reinforcement Learning. arXiv:1808.03196 [cs] (Aug. 2018). arXiv:1808.03196 [cs]Google ScholarGoogle Scholar
  12. Viktor Leis, Andrey Gubichev, Atanas Mirchev, Peter Boncz, Alfons Kemper, and Thomas Neumann. 2015. How Good Are Query Optimizers, Really? PVLDB 9, 3 (2015), 204--215. https://doi.org/10.14778/2850583.2850594Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Ryan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul, Mohammad Alizadeh, and Tim Kraska. 2021. Bao: Making Learned Query Optimization Practical. In Proceedings of the 2021 International Conference on Management of Data (SIGMOD '21). China. https://doi.org/10.1145/3448016.3452838Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Ryan Marcus, Parimarjan Negi, Hongzi Mao, Chi Zhang, Mohammad Alizadeh, Tim Kraska, Olga Papaemmanouil, and Nesime Tatbul. 2019. Neo: A Learned Query Optimizer. PVLDB 12, 11 (2019), 1705--1718. https://doi.org/10.14778/3342263.3342644Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Ryan Marcus and Olga Papaemmanouil. 2018. Deep Reinforcement Learning for Join Order Enumeration. In First International Workshop on Exploiting Artificial Intelligence Techniques for Data Management (aiDM @ SIGMOD '18). Houston, TX.Google ScholarGoogle Scholar
  16. Lili Mou, Ge Li, Lu Zhang, Tao Wang, and Zhi Jin. 2016. Convolutional Neural Networks over Tree Structures for Programming Language Processing. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence (AAAI '16). AAAI Press, Phoenix, Arizona, 1287--1293.Google ScholarGoogle ScholarCross RefCross Ref
  17. Parimarjan Negi, Ryan Marcus, Andreas Kipf, Hongzi Mao, Nesime Tatbul, Tim Kraska, and Mohammad Alizadeh. 2021. Flow-Loss: Learning Cardinality Estimates That Matter. Proc. VLDB Endow. 14, 11 (2021), 2019--2032. https://doi.org/10.14778/3476249.3476259Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Jennifer Ortiz, Magdalena Balazinska, Johannes Gehrke, and S. Sathiya Keerthi. 2018. Learning State Representations for Query Optimization with Deep Reinforcement Learning. In 2nd Workshop on Data Managmeent for End-to-End Machine Learning (DEEM '18).Google ScholarGoogle Scholar
  19. Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. 2017. Automatic Differentiation in PyTorch. In Neural Information Processing Workshops (NIPS-W '17).Google ScholarGoogle Scholar
  20. 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 SIGMOD '79 (SIGMOD '79), John Mylopolous and Michael Brodie (Eds.). Morgan Kaufmann, San Francisco (CA), 511--522. https://doi.org/10.1016/B978-0-934613-53-8.50038-8Google ScholarGoogle ScholarCross RefCross Ref
  21. Nathan Srebro, Jason Rennie, and Tommi Jaakkola. 2004. Maximum-Margin Matrix Factorization. In Advances in Neural Information Processing Systems, Vol. 17. MIT Press. https://papers.nips.cc/paper_files/paper/2004/hash/e0688d13958a19e087e123148555e4b4-Abstract.htmlGoogle ScholarGoogle Scholar
  22. Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. 2014. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. The Journal of Machine Learning Research 15, 1 (Jan. 2014), 1929--1958.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Michael Stillger, Guy M. Lohman, Volker Markl, and Mokhtar Kandil. 2001. LEO - DB2's LEarning Optimizer. In VLDB (VLDB '01). 19--28.Google ScholarGoogle Scholar
  24. Robin Van De Water, Francesco Ventura, Zoi Kaoudi, Jorge-Arnulfo Quiané-Ruiz, and Volker Markl. 2022. Farming Your ML-based Query Optimizer's Food. In 2022 IEEE 38th International Conference on Data Engineering (ICDE) (ICDE '22). 3186--3189. https://doi.org/10.1109/ICDE53745.2022.00294Google ScholarGoogle ScholarCross RefCross Ref
  25. Lianggui Weng, Rong Zhu, Di Wu, Bolin Ding, Bolong Zheng, and Jingren Zhou. 2024. Eraser: Eliminating Performance Regression on Learned Query Optimizer. PVLDB 17, 5 (2024), 926--938. https://doi.org/10.14778/3641204.3641205Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Lucas Woltmann, Jerome Thiessat, Claudio Hartmann, Dirk Habich, and Wolfgang Lehner. 2023. FASTgres: Making Learned Query Optimizer Hinting Effective. Proceedings of the VLDB Endowment 16, 11 (Aug. 2023), 3310--3322. https://doi.org/10.14778/3611479.3611528Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Zongheng Yang, Wei-Lin Chiang, Sifei Luan, Gautam Mittal, Michael Luo, and Ion Stoica. 2022. Balsa: Learning a Query Optimizer Without Expert Demonstrations. In Proceedings of the 2022 International Conference on Management of Data (SIGMOD '22). Association for Computing Machinery, New York, NY, USA, 931--944. https://doi.org/10.1145/3514221.3517885Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Xiang Yu, Chengliang Chai, Guoliang Li, and Jiabin Liu. 2022. Cost-Based or Learning-Based? A Hybrid Query Optimizer for Query Plan Selection. Proceedings of the VLDB Endowment 15, 13 (Sept. 2022), 3924--3936. https://doi.org/10.14778/3565838.3565846Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Xiang Yu, Guoliang Li, Chengliang Chai, and Nan Tang. 2020. Reinforcement Learning with Tree-LSTM for Join Order Selection. In 2020 IEEE 36th International Conference on Data Engineering (ICDE '20). 1297--1308. https://doi.org/10.1109/ICDE48307.2020.00116Google ScholarGoogle ScholarCross RefCross Ref
  30. Wangda Zhang, Matteo Interlandi, Paul Mineiro, Shi Qiao, Nasim Ghazanfari, Karlen Lie, Marc Friedman, Rafah Hosn, Hiren Patel, and Alekh Jindal. 2022. Deploying a Steered Query Optimizer in Production at Microsoft. In Proceedings of the 2022 International Conference on Management of Data (SIGMOD '22). ACM, Philadelphia PA USA, 2299--2311. https://doi.org/10.1145/3514221.3526052Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Rong Zhu, Wei Chen, Bolin Ding, Xingguang Chen, Andreas Pfadler, Ziniu Wu, and Jingren Zhou. 2023. Lero: A Learning-to-Rank Query Optimizer. Proceedings of the VLDB Endowment 16, 6 (Feb. 2023), 1466--1479. https://doi.org/10.14778/3583140.3583160Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Rong Zhu, Lianggui Weng, Wenqing Wei, Di Wu, Jiazhen Peng, Yifan Wang, Bolin Ding, Defu Lian, Bolong Zheng, and Jingren Zhou. 2024. PilotScope: Steering Databases with Machine Learning Drivers. PVLDB 17, 5 (2024), 980--993. https://doi.org/10.14778/3641204.3641209Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Ziniu Wu, Ryan Marcus, Zhengchun Liu, Parimarjan Negi, Vikram Nathan, Pascal Pfeil, Gaurav Saxena, Mohammad Rahman, Balakrishnan Narayanaswamy, and Tim Kraska. 2024. Stage: Query Execution Time Prediction in Amazon Redshift. In Proceedings of the 2024 International Conference on Management of Data (SIGMOD '24) (SIGMOD '24). Santiago, Chile. https://doi.org/10.48550/arXiv.2403.02286Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • Published in

    cover image ACM Conferences
    aiDM '24: Proceedings of the Seventh International Workshop on Exploiting Artificial Intelligence Techniques for Data Management
    June 2024
    37 pages
    ISBN:9798400706806
    DOI:10.1145/3663742

    Copyright © 2024 ACM

    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 9 June 2024

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • short-paper
    • Research
    • Refereed limited

    Acceptance Rates

    Overall Acceptance Rate19of26submissions,73%
  • Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0

    Other Metrics