{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,8,28]],"date-time":"2025-08-28T12:46:32Z","timestamp":1756385192961,"version":"3.41.0"},"reference-count":40,"publisher":"Association for Computing Machinery (ACM)","issue":"3","license":[{"start":{"date-parts":[[2024,11,8]],"date-time":"2024-11-08T00:00:00Z","timestamp":1731024000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["SIGMOD Rec."],"published-print":{"date-parts":[[2024,11,8]]},"abstract":"<jats:p>Modern database systems rely on cost-based query optimizers to come up with good execution plans for input queries. Such query optimizers rely on cost models to estimate the costs of candidate query execution plans. A cost model represents a function from a set of cost units to query execution cost, where each cost unit specifies the unit cost of executing a certain type of query processing operation (such as table scan or join). These cost units are traditionally viewed as constants, whose values only depend on the platform configuration where the database system runs on top of but are invariant for queries processed by the database system. In this paper, we challenge this classic view by thinking of these cost units as variables instead. We show that, by varying the cost-unit values one can obtain query plans that significantly outperform the default query plans returned by the query optimizer when viewing the cost units as constants. We term this cost-unit tuning process 'query tuning' (QT) and show that it is similar to the well-known hyper-parameter optimization (HPO) problem in AutoML. As a result, any state-of-the-art HPO technologies can be applied to QT. We study the QT problem in the context of anytime tuning, which is desirable in practice by constraining the total time spent on QT within a given budget-we call this problem budgetaware query tuning. We further extend our study from tuning a single query to tuning a workload with multiple queries, and we call this generalized problem budgetaware workload tuning (WT), which aims for minimizing the execution time of the entire workload. WT is more challenging as one needs to further prioritize individual query tuning within the given time budget. We propose solutions to both QT and WT and experimental evaluation using both benchmark and real workloads demonstrates the efficacy of our proposed solutions.<\/jats:p>","DOI":"10.1145\/3703922.3703926","type":"journal-article","created":{"date-parts":[[2024,11,8]],"date-time":"2024-11-08T23:37:24Z","timestamp":1731109044000},"page":"20-26","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Budget-aware Query Tuning: An AutoML Perspective"],"prefix":"10.1145","volume":"53","author":[{"given":"Wentao","family":"Wu","sequence":"first","affiliation":[{"name":"Microsoft Research"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Chi","family":"Wang","sequence":"additional","affiliation":[{"name":"Microsoft Research"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2024,11,8]]},"reference":[{"volume-title":"https:\/\/www.postgresql.org\/docs\/current\/runtime-configquery. html","year":"2024","key":"e_1_2_1_1_1","unstructured":"Postgresql planner cost constants. https:\/\/www.postgresql.org\/docs\/current\/runtime-configquery. html, 2024."},{"key":"e_1_2_1_2_1","first-page":"397","article-title":"Using confidence bounds for exploitation-exploration trade-offs","volume":"3","author":"Auer P.","year":"2002","unstructured":"P. Auer. Using confidence bounds for exploitation-exploration trade-offs. J. Mach. Learn. Res., 3:397--422, 2002.","journal-title":"J. Mach. Learn. Res."},{"key":"e_1_2_1_3_1","volume-title":"Finite-time analysis of the multiarmed bandit problem. Mach. Learn., 47(2--3):235--256","author":"Auer P.","year":"2002","unstructured":"P. Auer, N. Cesa-Bianchi, and P. Fischer. Finite-time analysis of the multiarmed bandit problem. Mach. Learn., 47(2--3):235--256, 2002."},{"key":"e_1_2_1_4_1","volume-title":"NIPS","author":"Bergstra J.","year":"2011","unstructured":"J. Bergstra, R. Bardenet, Y. Bengio, and B. K\u00e9gl. Algorithms for hyper-parameter optimization. In NIPS, 2011."},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.5555\/2503308.2188395"},{"key":"e_1_2_1_6_1","first-page":"115","volume-title":"ICML","volume":"28","author":"Bergstra J.","year":"2013","unstructured":"J. Bergstra, D. Yamins, and D. D. Cox. Making a science of model search: Hyperparameter optimization in hundreds of dimensions for vision architectures. In ICML, volume 28, pages 115--123, 2013."},{"key":"e_1_2_1_7_1","first-page":"469","volume-title":"Power hints for query optimization","author":"Bruno N.","year":"2009","unstructured":"N. Bruno, S. Chaudhuri, and R. Ramamurthy. Power hints for query optimization. pages 469--480, 2009."},{"key":"e_1_2_1_8_1","volume-title":"Sql server query optimizer cost formulas. https:\/\/slidetodoc.com\/sql-server-query-optimizer-costformulas- joe-chang-3\/","author":"Chang J.","year":"2010","unstructured":"J. Chang. Sql server query optimizer cost formulas. https:\/\/slidetodoc.com\/sql-server-query-optimizer-costformulas- joe-chang-3\/, 2010."},{"key":"e_1_2_1_9_1","volume-title":"June","author":"Chaudhuri S.","year":"2020","unstructured":"S. Chaudhuri and V. Narasayya. Anytime algorithm of database tuning advisor for microsoft sql server, June 2020."},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.14778\/3430915.3430931"},{"key":"e_1_2_1_11_1","first-page":"277","volume-title":"VLDB","author":"Du W.","year":"1992","unstructured":"W. Du, R. Krishnamurthy, and M. Shan. Query optimization in a heterogeneous DBMS. In VLDB, pages 277--291, 1992."},{"key":"e_1_2_1_12_1","first-page":"1436","volume-title":"ICML","volume":"80","author":"Falkner S.","year":"2018","unstructured":"S. Falkner, A. Klein, and F. Hutter. BOHB: robust and efficient hyperparameter optimization at scale. In ICML, volume 80, pages 1436--1445, 2018."},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.knosys.2020.106622"},{"issue":"1","key":"e_1_2_1_14_1","doi-asserted-by":"crossref","first-page":"1149","DOI":"10.14778\/1920841.1920984","article-title":"Xplus: A sql-tuning-aware query optimizer","volume":"3","author":"Herodotou H.","year":"2010","unstructured":"H. Herodotou and S. Babu. Xplus: A sql-tuning-aware query optimizer. Proc. VLDB Endow., 3(1):1149--1160, 2010.","journal-title":"Proc. VLDB Endow."},{"key":"e_1_2_1_15_1","volume-title":"Cost based optimizer in apache spark 2.2. https:\/\/www.databricks.com\/blog\/2017\/08\/31\/cost-basedoptimizer- in-apache-spark-2--2.html","author":"Hu R.","year":"2017","unstructured":"R. Hu, Z. Wang, W. Fan, and S. Agarwal. Cost based optimizer in apache spark 2.2. https:\/\/www.databricks.com\/blog\/2017\/08\/31\/cost-basedoptimizer- in-apache-spark-2--2.html, 2017."},{"key":"e_1_2_1_16_1","first-page":"507","volume-title":"LION","volume":"6683","author":"Hutter F.","year":"2011","unstructured":"F. Hutter, H. H. Hoos, and K. Leyton-Brown. Sequential model-based optimization for general algorithm configuration. In LION, volume 6683, pages 507--523, 2011."},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1007\/11871842_29"},{"key":"e_1_2_1_18_1","unstructured":"V. Leis. Join order benchmark. https:\/\/github.com\/gregrahn\/join-order-benchmark."},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.14778\/2850583.2850594"},{"key":"e_1_2_1_20_1","first-page":"185","article-title":"Hyperband: A novel bandit-based approach to hyperparameter optimization","volume":"18","author":"Li L.","year":"2017","unstructured":"L. Li, K. G. Jamieson, G. DeSalvo, A. Rostamizadeh, and A. Talwalkar. Hyperband: A novel bandit-based approach to hyperparameter optimization. J. Mach. Learn. Res., 18:185:1--185:52, 2017.","journal-title":"J. Mach. Learn. Res."},{"issue":"5","key":"e_1_2_1_21_1","doi-asserted-by":"crossref","first-page":"607","DOI":"10.1145\/3187009.3177737","article-title":"Ease.ml: Towards multi-tenant resource sharing for machine learning workloads","volume":"11","author":"Li T.","year":"2018","unstructured":"T. Li, J. Zhong, J. Liu, W. Wu, and C. Zhang. Ease.ml: Towards multi-tenant resource sharing for machine learning workloads. Proc. VLDB Endow., 11(5):607--620, 2018.","journal-title":"Proc. VLDB Endow."},{"key":"e_1_2_1_22_1","first-page":"3209","volume-title":"KDD","author":"Li Y.","year":"2021","unstructured":"Y. Li, Y. Shen, W. Zhang, Y. Chen, H. Jiang, M. Liu, J. Jiang, J. Gao, W. Wu, Z. Yang, C. Zhang, and B. Cui. Openbox: A generalized black-box optimization service. In KDD, pages 3209--3219, 2021."},{"key":"e_1_2_1_23_1","first-page":"23","article-title":"SMAC3: A versatile bayesian optimization package for hyperparameter optimization","author":"Lindauer M.","year":"2022","unstructured":"M. Lindauer, K. Eggensperger, M. Feurer, A. Biedenkapp, D. Deng, C. Benjamins, T. Ruhkopf, R. Sass, and F. Hutter. SMAC3: A versatile bayesian optimization package for hyperparameter optimization. JMLR, 23, 2022.","journal-title":"JMLR"},{"key":"e_1_2_1_24_1","unstructured":"G. Lohman. Is query optimization a ?solved? problem? http:\/\/wp.sigmod.org\/?p=1075."},{"key":"e_1_2_1_25_1","volume-title":"The db2 universal database optimizer. https:\/\/cs.uwaterloo.ca\/ ilyas\/CS448W14\/ibm.pdf","author":"Lohman G. M.","year":"2003","unstructured":"G. M. Lohman. The db2 universal database optimizer. https:\/\/cs.uwaterloo.ca\/ ilyas\/CS448W14\/ibm.pdf, 2003."},{"key":"e_1_2_1_26_1","first-page":"149","volume-title":"VLDB","author":"Mackert L. F.","year":"1986","unstructured":"L. F. Mackert and G. M. Lohman. R* optimizer validation and performance evaluation for distributed queries. In VLDB, pages 149--159, 1986."},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/3514221.3526152"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/3641832.3641836"},{"key":"e_1_2_1_29_1","volume-title":"NIPS","author":"Snoek J.","year":"2012","unstructured":"J. Snoek, H. Larochelle, and R. P. Adams. Practical bayesian optimization of machine learning algorithms. In NIPS, 2012."},{"key":"e_1_2_1_30_1","volume-title":"ICLR","author":"Wang C.","year":"2021","unstructured":"C. Wang, Q. Wu, S. Huang, and A. Saied. Economic hyperparameter optimization with blended search strategy. In ICLR, 2021."},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.14778\/3484224.3484236"},{"key":"e_1_2_1_32_1","volume-title":"Proc. ACM Manag. Data, 2(3)","author":"Wang X.","year":"2024","unstructured":"X. Wang, W. Wu, C. Wang, V. Narasayya, and S. Chaudhuri. Wii: Dynamic budget reallocation in index tuning. Proc. ACM Manag. Data, 2(3), 2024."},{"key":"e_1_2_1_33_1","volume-title":"AAAI","author":"Wu Q.","year":"2021","unstructured":"Q. Wu, C. Wang, and S. Huang. Frugal optimization for cost-related hyperparameters. In AAAI, 2021."},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.14778\/2536206.2536219"},{"key":"e_1_2_1_35_1","first-page":"1081","volume-title":"ICDE","author":"Wu W.","year":"2013","unstructured":"W. Wu, Y. Chi, S. Zhu, J. Tatemura, H. Hacig\u00fcm\u00fcs, and J. F. Naughton. Predicting query execution time: Are optimizer cost models really unusable? In ICDE, pages 1081--1092, 2013."},{"key":"e_1_2_1_36_1","first-page":"1721","volume-title":"SIGMOD","author":"Wu W.","year":"2016","unstructured":"W. Wu, J. F. Naughton, and H. Singh. Sampling-based query re-optimization. In F. \u00d6zcan, G. Koutrika, and S. Madden, editors, SIGMOD, pages 1721--1736. ACM, 2016."},{"key":"e_1_2_1_37_1","first-page":"1528","volume-title":"SIGMOD","author":"Wu W.","year":"2022","unstructured":"W. Wu, C. Wang, T. Siddiqui, J. Wang, V. R. Narasayya, S. Chaudhuri, and P. A. Bernstein. Budget-aware index tuning with reinforcement learning. In Z. G. Ives, A. Bonifati, and A. E. Abbadi, editors, SIGMOD, pages 1528--1541, 2022."},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.14778\/2733085.2733092"},{"key":"e_1_2_1_39_1","volume-title":"Hyper-parameter optimization: A review of algorithms and applications. CoRR, abs\/2003.05689","author":"Yu T.","year":"2020","unstructured":"T. Yu and H. Zhu. Hyper-parameter optimization: A review of algorithms and applications. CoRR, abs\/2003.05689, 2020."},{"issue":"12","key":"e_1_2_1_40_1","doi-asserted-by":"crossref","DOI":"10.1109\/TKDE.2023.3266893","article-title":"Automatic database knob tuning: A survey","volume":"35","author":"Zhao X.","year":"2023","unstructured":"X. Zhao, X. Zhou, and G. Li. Automatic database knob tuning: A survey. IEEE Trans. Knowl. Data Eng., 35(12), 2023.","journal-title":"IEEE Trans. Knowl. Data Eng."}],"container-title":["ACM SIGMOD Record"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3703922.3703926","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3703922.3703926","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T01:18:06Z","timestamp":1750295886000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3703922.3703926"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,11,8]]},"references-count":40,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2024,11,8]]}},"alternative-id":["10.1145\/3703922.3703926"],"URL":"https:\/\/doi.org\/10.1145\/3703922.3703926","relation":{},"ISSN":["0163-5808"],"issn-type":[{"type":"print","value":"0163-5808"}],"subject":[],"published":{"date-parts":[[2024,11,8]]},"assertion":[{"value":"2024-11-08","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}