{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,9]],"date-time":"2026-07-09T03:20:05Z","timestamp":1783567205991,"version":"3.55.0"},"reference-count":13,"publisher":"Association for Computing Machinery (ACM)","issue":"12","content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. VLDB Endow."],"published-print":{"date-parts":[[2023,8]]},"abstract":"<jats:p>Query rewriting is a challenging task that transforms a SQL query to improve its performance while maintaining its result set. However, it is difficult to rewrite SQL queries, which often involve complex logical structures, and there are numerous candidate rewrite strategies for such queries, making it an NP-hard problem. Existing databases or query optimization engines adopt heuristics to rewrite queries, but these approaches may not be able to judiciously and adaptively apply the rewrite rules and may cause significant performance regression in some cases (e.g., correlated subqueries may not be eliminated). To address these limitations, we introduce LearnedRewrite, a query rewrite system that combines traditional and learned algorithms (i.e., Monte Carlo tree search + hybrid estimator) to rewrite queries. We have implemented the system in Calcite, and experimental results demonstrate LearnedRewrite achieves superior performance on three real datasets.<\/jats:p>","DOI":"10.14778\/3611540.3611633","type":"journal-article","created":{"date-parts":[[2023,9,15]],"date-time":"2023-09-15T11:32:37Z","timestamp":1694777557000},"page":"4110-4113","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":13,"title":["A Learned Query Rewrite System"],"prefix":"10.14778","volume":"16","author":[{"given":"Xuanhe","family":"Zhou","sequence":"first","affiliation":[{"name":"Tsinghua University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Guoliang","family":"Li","sequence":"additional","affiliation":[{"name":"Tsinghua University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Jianming","family":"Wu","sequence":"additional","affiliation":[{"name":"Tsinghua University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Jiesi","family":"Liu","sequence":"additional","affiliation":[{"name":"Tsinghua University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Zhaoyan","family":"Sun","sequence":"additional","affiliation":[{"name":"Tsinghua University"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Xinning","family":"Zhang","sequence":"additional","affiliation":[{"name":"Tsinghua University"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2023,8]]},"reference":[{"key":"e_1_2_1_1_1","unstructured":"https:\/\/github.com\/jdorn\/sql-formatter (last checked on 2023-7)."},{"key":"e_1_2_1_2_1","unstructured":"https:\/\/github.com\/uwdb\/cosette (last checked on 2023-7)."},{"key":"e_1_2_1_3_1","unstructured":"https:\/\/github.com\/xiaomi\/soar (last checked on 2023-7)."},{"key":"e_1_2_1_4_1","first-page":"221","volume-title":"SIGMOD","author":"Begoli E.","year":"2018","unstructured":"E. Begoli, J. Camacho-Rodr\u00edguez, J. Hyde, and et al. Apache calcite: A foundational framework for optimized query processing over heterogeneous data sources. In SIGMOD, pages 221--230, 2018."},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/3062341.3062348"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.1991.131472"},{"key":"e_1_2_1_7_1","volume-title":"Can LLM already serve as A database interface? A big bench for large-scale database grounded text-to-sqls. CoRR, abs\/2305.03111","author":"Li J.","year":"2023","unstructured":"J. Li and et al. Can LLM already serve as A database interface? A big bench for large-scale database grounded text-to-sqls. CoRR, abs\/2305.03111, 2023."},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/130283.130294"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/3299869.3300088"},{"key":"e_1_2_1_10_1","first-page":"94","volume-title":"SIGMOD","author":"Wang Z.","year":"2022","unstructured":"Z. Wang, Z. Zhou, Y. Yang, and et al. Wetune: Automatic discoveryand verification of query rewrite rules. In SIGMOD, pages 94--107, 2022."},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/3514221.3526155"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2020.2994641"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.14778\/3485450.3485456"}],"container-title":["Proceedings of the VLDB Endowment"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.14778\/3611540.3611633","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,9,10]],"date-time":"2025-09-10T22:36:29Z","timestamp":1757543789000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.14778\/3611540.3611633"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,8]]},"references-count":13,"journal-issue":{"issue":"12","published-print":{"date-parts":[[2023,8]]}},"alternative-id":["10.14778\/3611540.3611633"],"URL":"https:\/\/doi.org\/10.14778\/3611540.3611633","relation":{},"ISSN":["2150-8097"],"issn-type":[{"value":"2150-8097","type":"print"}],"subject":[],"published":{"date-parts":[[2023,8]]},"assertion":[{"value":"2023-08-01","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}