Skip to main content

MSP: Learned Query Performance Prediction Using MetaInfo and Structure of Plans

  • Conference paper
  • First Online:
Web and Big Data (APWeb-WAIM 2022)

Abstract

Query performance prediction is important and challenging in database management systems. The traditional cost-based methods perform poorly predicting query performance due to inaccurate cost estimates. In recent years, research shows that learning-based query performance prediction without actual execution has outperformed traditional models. However, existing learning-based models still have limitations in feature encoding and model design. To address these limitations, we propose a method of query performance prediction based on the binary tree-structured model fully expressing the impact between plan tree nodes. We also present an efficient metadata encoding method, taking into account the data type and value distribution of the columns, which we call metaInfo. This encoding method can support various complex SQL queries on changing data. The experiments are conducted on real-world datasets, and the experimental results show that our approach outperforms the state-of-the-art method.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Akdere, M., Çetintemel, U., Riondato, M., Upfal, E., Zdonik, S.B.: Learning-based query performance modeling and prediction. In: IEEE (2012)

    Google Scholar 

  2. Bengio, Y., Simard, P., Frasconi, P.: Learning long-term dependencies with gradient descent is difficult. IEEE Trans. Neural Netw. 5(2), 157–166 (1994)

    Article  Google Scholar 

  3. Chi, Y., Moon, H.J., Hacigümüs, H.: ICBS: Incremental cost based scheduling under piecewise linear SLAS. Proc. VLDB Endow. 4(9), 563–574 (2011)

    Article  Google Scholar 

  4. De Myttenaere, A., Golden, B., Le Grand, B., Rossi, F.: Mean absolute percentage error for regression models. Neurocomputing 192, 38–48 (2016)

    Article  Google Scholar 

  5. Ganapathi, A., Kuno, H.A., Dayal, U., Wiener, J.L., Patterson, D.A.: Predicting multiple metrics for queries: better decisions enabled by machine learning. In: IEEE International Conference on Data Engineering (2009)

    Google Scholar 

  6. Guo, R.B., Daudjee, K.: Research challenges in deep reinforcement learning-based join query optimization. In: Proceedings of the Third International Workshop on Exploiting Artificial Intelligence Techniques for Data Management, pp. 1–6 (2020)

    Google Scholar 

  7. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997)

    Article  Google Scholar 

  8. Kipf, A., Kipf, T., Radke, B., Leis, V., Boncz, P.A., Kemper, A.: Learned cardinalities: estimating correlated joins with deep learning. In: CIDR (2019)

    Google Scholar 

  9. Leis, V., Gubichev, A., Mirchev, A., Boncz, P., Kemper, A., Neumann, T.: How good are query optimizers, really? Proc. VLDB Endow. 9(3), 204–215 (2015)

    Article  Google Scholar 

  10. Li, J., König, A., Narasayya, V., Chaudhuri, S.: Robust estimation of resource consumption for SQL queries using statistical techniques. Proc. VLDB Endow. 5(11), 1555–1566 (2012)

    Article  Google Scholar 

  11. Liu, H., Xu, M., Yu, Z., Corvinelli, V., Zuzarte, C.: Cardinality estimation using neural networks. IBM Corp. (2015)

    Google Scholar 

  12. Lohman, G.: Is query optimization a “solved” problem. In: Proceedings of Workshop on Database Query Optimization, vol. 13, p. 10. Oregon Graduate Center Computer Science and Technical Report (2014)

    Google Scholar 

  13. Marcus, R., Papaemmanouil, O.: Plan-structured deep neural network models for query performance prediction. In: Proceedings of the VLDB Endowment (2019)

    Google Scholar 

  14. Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. Computer Science (2013)

    Google Scholar 

  15. Mishra, C., Koudas, N.: The design of a query monitoring system. ACM Trans. Database Syst. 34(1), 1–51 (2009)

    Article  Google Scholar 

  16. Moerkotte, G., Neumann, T., Steidl, G.: Preventing bad plans by bounding the impact of cardinality estimation errors. Proc. VLDB Endow. 2(1), 982–993 (2009)

    Article  Google Scholar 

  17. Ni, J., Zhao, Y., Zeng, K., Su, H., Zheng, K.: DeepQT : learning sequential context for query execution time prediction. In: Nah, Y., Cui, B., Lee, S.-W., Yu, J.X., Moon, Y.-S., Whang, S.E. (eds.) DASFAA 2020. LNCS, vol. 12114, pp. 188–203. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-59419-0_12

    Chapter  Google Scholar 

  18. Sun, J., Li, G.: An end-to-end learning-based cost estimator. Proc. VLDB Endow. 13(3), 307–319 (2019)

    Article  MathSciNet  Google Scholar 

  19. Sun, J., Li, G., Tang, N.: Learned cardinality estimation for similarity queries. In: Proceedings of the 2021 International Conference on Management of Data, pp. 1745–1757 (2021)

    Google Scholar 

  20. Taft, R., Lang, W., Duggan, J., Elmore, A.J., Dewitt, D.: Step:scalable tenant placement for managing database-as-a-service deployments. In: ACM Symposium on Cloud Computing (2016)

    Google Scholar 

  21. Tai, K.S., Socher, R., Manning, C.: Improved semantic representations from tree-structured long short-term memory networks. Comput. Sci. 5(1), 36 (2015)

    Google Scholar 

  22. Tozer, S., Brecht, T., Aboulnaga, A.: Q-cop: avoiding bad query mixes to minimize client timeouts under heavy loads. In: 2010 IEEE 26th International Conference on Data Engineering (ICDE 2010) (2010)

    Google Scholar 

  23. Wu, C., Jindal, A., Amizadeh, S., Patel, H., Rao, S.: Towards a learning optimizer for shared clouds. Proc. VLDB Endow. 12(3), 210–222 (2018)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yuwei Peng .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Liu, H., Peng, Z., Zhang, Z., Jiang, H., Peng, Y. (2023). MSP: Learned Query Performance Prediction Using MetaInfo and Structure of Plans. In: Li, B., Yue, L., Tao, C., Han, X., Calvanese, D., Amagasa, T. (eds) Web and Big Data. APWeb-WAIM 2022. Lecture Notes in Computer Science, vol 13423. Springer, Cham. https://doi.org/10.1007/978-3-031-25201-3_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-25201-3_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-25200-6

  • Online ISBN: 978-3-031-25201-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics