{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,15]],"date-time":"2026-09-15T01:18:37Z","timestamp":1789435117475,"version":"build-2803163510"},"reference-count":43,"publisher":"Association for Computing Machinery (ACM)","issue":"3","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. VLDB Endow."],"published-print":{"date-parts":[[2021,11]]},"abstract":"<jats:p>\n                    Parametric query optimization (PQO) must address two problems: identify a relatively small number of plans to cache for a parameterized query (populateCache), and efficiently select the best cached plan to use for executing any instance of the parameterized query (getPlan). Our approach decouples these two decisions. We formulate populateCache as an optimization problem with the goal of identifying a set of plans that minimizes the optimizer estimated cost of queries in the log, and present an efficient algorithm. For getPlan, we leverage query logs to train machine learning (ML) models to choose the lowest optimizer-estimated cost plan from the cached plans. We conduct extensive experiments using complex parameterized queries from benchmarks and real workloads. Our algorithm for populateCache achieves low geometric mean sub-optimality (1.2) even for complex queries using relatively few plans, and scales well to large query logs. The mean latency of our ML model based getPlan technique (~ 210\u03bc\n                    <jats:italic>sec<\/jats:italic>\n                    ) is between one to four orders of magnitude faster compared to prior PQO techniques. The mean sub-optimality is low (1.05), and the 95\n                    <jats:sup>th<\/jats:sup>\n                    percentile sub-optimality (1.3) is between 1.1\u00d7 and 25\u00d7 lower compared to prior techniques. Finally, we present an efficient algorithm for getPlan that leverages execution time information in query logs to circumvent inaccuracies of the query optimizer's cost estimates.\n                  <\/jats:p>","DOI":"10.14778\/3494124.3494126","type":"journal-article","created":{"date-parts":[[2022,2,4]],"date-time":"2022-02-04T19:31:46Z","timestamp":1644003106000},"page":"401-413","source":"Crossref","is-referenced-by-count":20,"title":["Leveraging query logs and machine learning for parametric query optimization"],"prefix":"10.14778","volume":"15","author":[{"given":"Kapil","family":"Vaidya","sequence":"first","affiliation":[{"name":"MIT"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Anshuman","family":"Dutt","sequence":"additional","affiliation":[{"name":"Microsoft Research"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Vivek","family":"Narasayya","sequence":"additional","affiliation":[{"name":"Microsoft Research"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Surajit","family":"Chaudhuri","sequence":"additional","affiliation":[{"name":"Microsoft Research"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2022,2,4]]},"reference":[{"key":"e_1_2_1_1_1","unstructured":"[n.d.]. https:\/\/scikit-learn.org\/stable\/modules\/tree.html.  [n.d.]. https:\/\/scikit-learn.org\/stable\/modules\/tree.html."},{"key":"e_1_2_1_2_1","unstructured":"[n.d.]. http:\/\/www.tpc.org\/tpcds\/.  [n.d.]. http:\/\/www.tpc.org\/tpcds\/."},{"key":"e_1_2_1_3_1","unstructured":"[n.d.]. https:\/\/www.microsoft.com\/en-us\/download\/confirmation.aspx?id=52430.  [n.d.]. https:\/\/www.microsoft.com\/en-us\/download\/confirmation.aspx?id=52430."},{"key":"e_1_2_1_4_1","unstructured":"[n.d.]. Plan Caching in SQL Server. https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/performance-monitor\/sql-server-plan-cache-object?view=sql-server-ver15.  [n.d.]. Plan Caching in SQL Server. https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/performance-monitor\/sql-server-plan-cache-object?view=sql-server-ver15."},{"key":"e_1_2_1_5_1","unstructured":"[n.d.]. Plan guides in SQL Server. https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/performance\/plan-guides?view=sql-server-ver15.  [n.d.]. Plan guides in SQL Server. https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/performance\/plan-guides?view=sql-server-ver15."},{"key":"e_1_2_1_6_1","unstructured":"[n.d.]. Query Store in SQL Server. https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/performance-monitor\/sql-server-query-store-object?view=sql-server-ver15.  [n.d.]. Query Store in SQL Server. https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/performance-monitor\/sql-server-query-store-object?view=sql-server-ver15."},{"key":"e_1_2_1_7_1","unstructured":"[n.d.]. SQL Server XEvents. https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/extended-events\/extended-events?view=sql-server-ver15.  [n.d.]. SQL Server XEvents. https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/extended-events\/extended-events?view=sql-server-ver15."},{"key":"e_1_2_1_8_1","unstructured":"[n.d.]. USE PLAN hint. https:\/\/docs.microsoft.com\/en-us\/sql\/t-sql\/queries\/hints-transact-sql-query?view=sql-server-ver15.  [n.d.]. USE PLAN hint. https:\/\/docs.microsoft.com\/en-us\/sql\/t-sql\/queries\/hints-transact-sql-query?view=sql-server-ver15."},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2012.57"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2008.160"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.5555\/2050345.2050366"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.5555\/2986459.2986710"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/1559845.1559955"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/1807167.1807226"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/2939672.2939785"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/543613.543651"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/303976.303990"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/191843.191872"},{"key":"e_1_2_1_19_1","volume-title":"Adapting multi-armed bandits policies to contextual bandits scenarios. CoRR abs\/1811.04383","author":"Cortes David","year":"2018","unstructured":"David Cortes . 2018. Adapting multi-armed bandits policies to contextual bandits scenarios. CoRR abs\/1811.04383 ( 2018 ). arXiv:1811.04383 http:\/\/arxiv.org\/abs\/1811.04383 David Cortes. 2018. Adapting multi-armed bandits policies to contextual bandits scenarios. CoRR abs\/1811.04383 (2018). arXiv:1811.04383 http:\/\/arxiv.org\/abs\/1811.04383"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.5555\/1325851.1325973"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.14778\/1454159.1454173"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/3035918.3064040"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.14778\/3407790.3407820"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.14778\/3329772.3329780"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.5555\/645924.671329"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/1559845.1559946"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/67544.66960"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.5555\/1287369.1287385"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.5555\/1315451.1315517"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1007\/s007780050037"},{"key":"e_1_2_1_31_1","volume-title":"Cost Model, and Plan Enumeration. Data Science and Engineering","author":"Lan H","year":"2021","unstructured":"H Lan , Z Bao , and Y Peng . 2021. A Survey on Advancing the DBMS Query Optimizer: Cardinality Estimation , Cost Model, and Plan Enumeration. Data Science and Engineering ( 2021 ), 86--101. H Lan, Z Bao, and Y Peng. 2021. A Survey on Advancing the DBMS Query Optimizer: Cardinality Estimation, Cost Model, and Plan Enumeration. Data Science and Engineering (2021), 86--101."},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.14778\/1454159.1454178"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1007\/s00778-017-0480-7"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3448016.3452838"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.14778\/3342263.3342644"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.5555\/3454287.3454412"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.5555\/1083592.1083735"},{"key":"e_1_2_1_38_1","volume-title":"Abbas Kazerouni, Ian Osband, and Zheng Wen.","author":"Russo Daniel","year":"2017","unstructured":"Daniel Russo , Benjamin Van Roy , Abbas Kazerouni, Ian Osband, and Zheng Wen. 2017 . A tutorial on thompson sampling. arXiv preprint arXiv:1707.02038 (2017). Daniel Russo, Benjamin Van Roy, Abbas Kazerouni, Ian Osband, and Zheng Wen. 2017. A tutorial on thompson sampling. arXiv preprint arXiv:1707.02038 (2017)."},{"key":"e_1_2_1_39_1","unstructured":"Rajat Sen Karthikeyan Shanmugam and Sanjay Shakkottai. 2018. Contextual Bandits with Stochastic Experts. In AISTATS.  Rajat Sen Karthikeyan Shanmugam and Sanjay Shakkottai. 2018. Contextual Bandits with Stochastic Experts. In AISTATS."},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1007\/11564096_42"},{"key":"e_1_2_1_41_1","volume-title":"John Langford, and Sahand Negahban.","author":"Zhang Chicheng","year":"2019","unstructured":"Chicheng Zhang , Alekh Agarwal , Hal Daum\u00e9 Iii , John Langford, and Sahand Negahban. 2019 . Warm-starting Contextual Bandits: Robustly Combining Supervised and Bandit Feedback. In ICML. Chicheng Zhang, Alekh Agarwal, Hal Daum\u00e9 Iii, John Langford, and Sahand Negahban. 2019. Warm-starting Contextual Bandits: Robustly Combining Supervised and Bandit Feedback. In ICML."},{"key":"e_1_2_1_42_1","volume-title":"A Survey on Contextual Multi-armed Bandits. CoRR abs\/1508.03326","author":"Zhou Li","year":"2015","unstructured":"Li Zhou . 2015. A Survey on Contextual Multi-armed Bandits. CoRR abs\/1508.03326 ( 2015 ). arXiv:1508.03326 http:\/\/arxiv.org\/abs\/1508.03326 Li Zhou. 2015. A Survey on Contextual Multi-armed Bandits. CoRR abs\/1508.03326 (2015). arXiv:1508.03326 http:\/\/arxiv.org\/abs\/1508.03326"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.5555\/1597538.1597630"}],"container-title":["Proceedings of the VLDB Endowment"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.14778\/3494124.3494126","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2022,12,28]],"date-time":"2022-12-28T06:25:56Z","timestamp":1672208756000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.14778\/3494124.3494126"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021,11]]},"references-count":43,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2021,11]]}},"alternative-id":["10.14778\/3494124.3494126"],"URL":"https:\/\/doi.org\/10.14778\/3494124.3494126","relation":{},"ISSN":["2150-8097"],"issn-type":[{"value":"2150-8097","type":"print"}],"subject":[],"published":{"date-parts":[[2021,11]]}}}