{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,1]],"date-time":"2026-06-01T20:36:31Z","timestamp":1780346191388,"version":"3.54.1"},"reference-count":84,"publisher":"Association for Computing Machinery (ACM)","issue":"3","funder":[{"DOI":"10.13039\/501100006374","name":"National Natural Science Foundation of China","doi-asserted-by":"publisher","award":["62272168"],"award-info":[{"award-number":["62272168"]}],"id":[{"id":"10.13039\/501100006374","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/501100006374","name":"Natural Science Foundation of Shanghai","doi-asserted-by":"publisher","award":["23ZR1419900"],"award-info":[{"award-number":["23ZR1419900"]}],"id":[{"id":"10.13039\/501100006374","id-type":"DOI","asserted-by":"publisher"}]},{"name":"ECNU-OceanBase Joint Research Lab"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Manag. Data"],"published-print":{"date-parts":[[2025,6,17]]},"abstract":"<jats:p>\n                    Prediction queries that apply machine learning (ML) models to perform analysis on data stored in the database are prevalent with the advance of research. Current database systems introduce Python UDFs to express prediction queries and call ML frameworks for inference. However, the impedance mismatch between database engines and prediction query execution imposes a challenge for query performance. First, the database engine is oblivious to the internal semantics of prediction functions and evaluates the UDF holistically, which incurs the repetitive inference context setup. Second, the invocation of prediction functions in the database does not consider that batching inference with a desirable inference batch size achieves a high performance in ML frameworks. To mitigate the mismatch, we propose to employ a prediction-aware operator in database engines, which leverages\n                    <jats:italic toggle=\"yes\">inference context reuse cache<\/jats:italic>\n                    to achieve an automatic one-off inference context setup and\n                    <jats:italic toggle=\"yes\">batch-aware function invocation<\/jats:italic>\n                    to ensure desirable batching inference. We implement a prototype system, called IMBridge, based on an open-source database OceanBase. Our experiments show that IMBridge achieves a 71.4x speedup on average over OceanBase for prediction query execution and significantly outperforms other solutions.\n                  <\/jats:p>","DOI":"10.1145\/3725326","type":"journal-article","created":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T21:23:29Z","timestamp":1750281809000},"page":"1-28","source":"Crossref","is-referenced-by-count":6,"title":["Mitigating the Impedance Mismatch between Prediction Query Execution and Database Engine"],"prefix":"10.1145","volume":"3","author":[{"ORCID":"https:\/\/orcid.org\/0009-0007-8265-8461","authenticated-orcid":false,"given":"Chenyang","family":"Zhang","sequence":"first","affiliation":[{"name":"East China Normal University, Shanghai, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-8551-4395","authenticated-orcid":false,"given":"Junxiong","family":"Peng","sequence":"additional","affiliation":[{"name":"East China Normal University, Shanghai, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3429-4732","authenticated-orcid":false,"given":"Chen","family":"Xu","sequence":"additional","affiliation":[{"name":"East China Normal University, Shanghai, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8989-9662","authenticated-orcid":false,"given":"Quanqing","family":"Xu","sequence":"additional","affiliation":[{"name":"OceanBase, Ant Group, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0009-3530-6476","authenticated-orcid":false,"given":"Chuanhui","family":"Yang","sequence":"additional","affiliation":[{"name":"OceanBase, Ant Group, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,6,18]]},"reference":[{"key":"e_1_2_2_1_1","volume-title":"Proceedings of the 10th Conference on Innovative Data Systems Research (CIDR).","author":"Agrawal Ashvin","year":"2020","unstructured":"Ashvin Agrawal, Rony Chatterjee, Carlo Curino, Avrilia Floratou, Neha Godwal, Matteo Interlandi, Alekh Jindal, Konstantinos Karanasos, Subru Krishnan, Brian Kroth, Jyoti Leeka, Kwanghyun Park, Hiren Patel, Olga Poppe, Fotis Psallidas, Raghu Ramakrishnan, Abhishek Roy, Karla Saur, Rathijit Sen, Markus Weimer, Travis Wright, and Yiwen Zhu. 2020. Cloudy with high chance of DBMS: A 10-year prediction for Enterprise-Grade ML. In Proceedings of the 10th Conference on Innovative Data Systems Research (CIDR)."},{"key":"e_1_2_2_2_1","volume-title":"Ullman","author":"Aho Alfred V.","year":"2006","unstructured":"Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman. 2006. Compilers: Principles, Techniques, and Tools (2nd Edition)."},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1109\/SC41405.2020.00073"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3620665.3640366"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/2723372.2742797"},{"key":"e_1_2_2_6_1","unstructured":"Henri Bal Peter Boncz and Marcin Zukowski. 2010. Multi-core parallelization of vectorized query execution. Ph.D. Dissertation. University of Warsaw."},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/3639313"},{"key":"e_1_2_2_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/3589266"},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.14778\/3611540.3611554"},{"key":"e_1_2_2_10_1","unstructured":"ClickHouse. 2024. ClickHouse. https:\/\/clickhouse.com\/docs\/en\/intro."},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/3419111.3421285"},{"key":"e_1_2_2_12_1","volume-title":"Proceedings of the 14th USENIX Symposium on Networked Systems Design and Implementation (NSDI). 613--627","author":"Crankshaw Daniel","year":"2017","unstructured":"Daniel Crankshaw, Xin Wang, Guilio Zhou, Michael J. Franklin, Joseph E. Gonzalez, and Ion Stoica. 2017. Clipper: A Low-Latency Online Prediction Serving System. In Proceedings of the 14th USENIX Symposium on Networked Systems Design and Implementation (NSDI). 613--627."},{"key":"e_1_2_2_13_1","volume-title":"Proceedings of the 2022 USENIX Annual Technical Conference (USENIX ATC). 183--198","author":"Cui Weihao","year":"2022","unstructured":"Weihao Cui, Han Zhao, Quan Chen, Hao Wei, Zirui Li, Deze Zeng, Chao Li, and Minyi Guo. 2022. DVABatch: Diversity-aware Multi-Entry Multi-Exit Batching for Efficient Processing of DNN Services on GPUs. In Proceedings of the 2022 USENIX Annual Technical Conference (USENIX ATC). 183--198."},{"key":"e_1_2_2_14_1","volume-title":"Proceedings of the 38th IEEE International Conference on Data Engineering (ICDE). 820--832","author":"Deshmukh Harshad","unstructured":"Harshad Deshmukh, Bruhathi Sundarmurthy, and Jignesh M. Patel. 2022. On inter-operator data transfers in query processing. In Proceedings of the 38th IEEE International Conference on Data Engineering (ICDE). 820--832."},{"key":"e_1_2_2_15_1","volume-title":"Documentation: Execution Format. https:\/\/duckdb.org\/internals\/vector.html.","author":"DB.","year":"2024","unstructured":"DuckDB. 2024. Documentation: Execution Format. https:\/\/duckdb.org\/internals\/vector.html."},{"key":"e_1_2_2_16_1","unstructured":"DuckDB. 2024. From Waddle to Flying: Quickly expanding DuckDB's functionality with Scalar Python UDFs. https:\/\/duckdb.org\/2023\/07\/07\/python-udf.html."},{"key":"e_1_2_2_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/3514221.3520175"},{"key":"e_1_2_2_18_1","unstructured":"Flake8. 2024. Flake8: Your Tool For Style Guide Enforcement. https:\/\/flake8.pycqa.org\/en\/latest\/."},{"key":"e_1_2_2_19_1","doi-asserted-by":"publisher","DOI":"10.14778\/3611540.3611574"},{"key":"e_1_2_2_20_1","doi-asserted-by":"publisher","DOI":"10.14778\/3547305.3547328"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.14778\/3554821.3554842"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/3589273"},{"key":"e_1_2_2_23_1","doi-asserted-by":"publisher","DOI":"10.14778\/3489496.3489501"},{"key":"e_1_2_2_24_1","doi-asserted-by":"publisher","DOI":"10.14778\/3551793.3551833"},{"key":"e_1_2_2_25_1","doi-asserted-by":"publisher","DOI":"10.14778\/2367502.2367510"},{"key":"e_1_2_2_26_1","doi-asserted-by":"publisher","DOI":"10.14778\/3611479.3611509"},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.21105\/joss.02174"},{"key":"e_1_2_2_28_1","unstructured":"Inc. Google. 2024. Big Query ML. https:\/\/cloud.google.com\/bigquery\/docs\/bqml-introduction."},{"key":"e_1_2_2_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3318464.3386137"},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.14778\/3551793.3551801"},{"key":"e_1_2_2_31_1","volume-title":"State of Data Science and Machine Learning","year":"2022","unstructured":"Kaggle. 2022. State of Data Science and Machine Learning 2022. https:\/\/www.kaggle.com\/kaggle-survey-2022."},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.14778\/3611540.3611626"},{"key":"e_1_2_2_33_1","volume-title":"Proceedings of the 10th Conference on Innovative Data Systems Research (CIDR).","author":"Karanasos Konstantinos","year":"2020","unstructured":"Konstantinos Karanasos, Matteo Interlandi, Doris Xin, Fotis Psallidas, Rathijit Sen, Kwanghyun Park, Ivan Popivanov, Supun Nakandal, Subru Krishnan, Markus Weimer, Yuan Yu, Raghu Ramakrishnan, and Carlo Curino. 2020. Extending Relational Query Processing with ML Inference. In Proceedings of the 10th Conference on Innovative Data Systems Research (CIDR)."},{"key":"e_1_2_2_34_1","doi-asserted-by":"publisher","DOI":"10.14778\/3275366.3284966"},{"key":"e_1_2_2_35_1","volume-title":"Proceedings of the 12th Conference on Innovative Data Systems Research (CIDR).","author":"Kl\u00e4be Steffen","year":"2022","unstructured":"Steffen Kl\u00e4be, Robert DeSantis, Stefan Hagedorn, and Kai-Uwe Sattler. 2022. Accelerating Python UDFs in Vectorized Query Execution. In Proceedings of the 12th Conference on Innovative Data Systems Research (CIDR)."},{"key":"e_1_2_2_36_1","volume-title":"Proceedings of the 26th International Conference on Extending Database Technology (EDBT).","author":"Kl\u00e4be Steffen","year":"2023","unstructured":"Steffen Kl\u00e4be, Stefan Hagedorn, and Kai-Uwe Sattler. 2023. Exploration of Approaches for In-Database ML. In Proceedings of the 26th International Conference on Extending Database Technology (EDBT)."},{"key":"e_1_2_2_37_1","doi-asserted-by":"publisher","DOI":"10.14778\/3467861.3467869"},{"key":"e_1_2_2_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/2882903.2882952"},{"key":"e_1_2_2_39_1","volume-title":"International Symposium on Code Generation and Optimization","author":"Lattner C.","year":"2004","unstructured":"C. Lattner and V. Adve. 2004. LLVM: a compilation framework for lifelong program analysis & transformation. In International Symposium on Code Generation and Optimization, 2004. (CGO). 75--86."},{"key":"e_1_2_2_40_1","volume-title":"MLIR: Scaling Compiler Infrastructure for Domain Specific Computation. In 2021 IEEE\/ACM International Symposium on Code Generation and Optimization (CGO). 2--14","author":"Lattner Chris","year":"2021","unstructured":"Chris Lattner, Mehdi Amini, Uday Bondhugula, Albert Cohen, Andy Davis, Jacques Pienaar, River Riddle, Tatiana Shpeisman, Nicolas Vasilache, and Oleksandr Zinenko. 2021. MLIR: Scaling Compiler Infrastructure for Domain Specific Computation. In 2021 IEEE\/ACM International Symposium on Code Generation and Optimization (CGO). 2--14."},{"key":"e_1_2_2_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/2588555.2610507"},{"key":"e_1_2_2_42_1","doi-asserted-by":"publisher","DOI":"10.14778\/3137765.3137812"},{"key":"e_1_2_2_43_1","doi-asserted-by":"publisher","DOI":"10.14778\/3626292.3626296"},{"key":"e_1_2_2_44_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE53745.2022.00180"},{"key":"e_1_2_2_45_1","doi-asserted-by":"publisher","DOI":"10.14778\/3632093.3632095"},{"key":"e_1_2_2_46_1","volume-title":"ChameleonAPI: Automatic and Efficient Customization of Neural Networks for ML Applications. In 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI). 365--386","author":"Liu Yuhan","year":"2024","unstructured":"Yuhan Liu, Chengcheng Wan, Kuntai Du, Henry Hoffmann, Junchen Jiang, Shan Lu, and Michael Maire. 2024. ChameleonAPI: Automatic and Efficient Customization of Neural Networks for ML Applications. In 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI). 365--386."},{"key":"e_1_2_2_47_1","doi-asserted-by":"publisher","DOI":"10.1145\/3405470"},{"key":"e_1_2_2_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/3448016.3457562"},{"key":"e_1_2_2_49_1","unstructured":"Mark Raasveldt. 2024. Memory Management in DuckDB. https:\/\/duckdb.org\/2024\/07\/09\/memory-management.html."},{"key":"e_1_2_2_50_1","doi-asserted-by":"publisher","DOI":"10.14778\/3151113.3151114"},{"key":"e_1_2_2_51_1","volume-title":"Proc. ACM Program. Lang. (OOPSLA) 8","author":"Michael Jungmair","year":"2024","unstructured":"Jungmair Michael, Engelke Alexis, and Giceva Jana. 2024. HiPy: Extracting High-Level Semantics from Python Code for Data Processing. Proc. ACM Program. Lang. (OOPSLA) 8 (2024)."},{"key":"e_1_2_2_52_1","volume-title":"Mypy: Static Typing for Python. https:\/\/www.mypy-lang.org\/.","year":"2024","unstructured":"mypyproject. 2024. Mypy: Static Typing for Python. https:\/\/www.mypy-lang.org\/."},{"key":"e_1_2_2_53_1","doi-asserted-by":"publisher","DOI":"10.14778\/2002938.2002940"},{"key":"e_1_2_2_54_1","doi-asserted-by":"publisher","DOI":"10.1145\/3465998.3466009"},{"key":"e_1_2_2_55_1","unstructured":"OceanBase. 2024. OceanBase Database. https:\/\/github.com\/oceanbase\/oceanbase."},{"key":"e_1_2_2_56_1","unstructured":"ONNX Runtime. 2024. Python API documentation. https:\/\/onnxruntime.ai\/docs\/api\/python\/tutorial.html."},{"key":"e_1_2_2_57_1","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2023.3269592"},{"key":"e_1_2_2_58_1","volume-title":"Conference on Innovative Data Systems Research (CIDR).","author":"Palkar Shoumik","year":"2017","unstructured":"Shoumik Palkar, James J. Thomas, Anil Shanbhag, Deepak Narayanan, Holger Pirk, Malte Schwarzkopf, Saman P. Amarasinghe, Matei A. Zaharia, and Stanford InfoLab. 2017. A Common Runtime for High Performance Data Analysis. In Conference on Innovative Data Systems Research (CIDR)."},{"key":"e_1_2_2_59_1","doi-asserted-by":"publisher","DOI":"10.1145\/3514221.3526141"},{"key":"e_1_2_2_60_1","doi-asserted-by":"publisher","DOI":"10.14778\/3554821.3554829"},{"key":"e_1_2_2_61_1","unstructured":"PostgreSQL. 2024. PostgreSQL PL\/Python. https:\/\/www.postgresql.org\/docs\/current\/plpython-funcs.html."},{"key":"e_1_2_2_62_1","volume-title":"Carlo Curino, and Konstantinos Karanasos","author":"Psallidas Fotis","year":"2022","unstructured":"Fotis Psallidas, Yiwen Zhu, Bojan Karlas, Jordan Henkel, Matteo Interlandi, Subru Krishnan, Brian Kroth, Venkatesh Emani, Wentao Wu, Ce Zhang, Markus Weimer, Avrilia Floratou, Carlo Curino, and Konstantinos Karanasos. 2022. Data Science Through the Looking Glass: Analysis of Millions of GitHub Notebooks and ML.NET Pipelines. SIGMOD Rec. (2022), 30--37."},{"key":"e_1_2_2_63_1","volume-title":"Proceedings of the 21st International Conference on Extending Database Technology (EDBT). 473--476","author":"Raasveldt Mark","year":"2018","unstructured":"Mark Raasveldt, Pedro Holanda, Hannes M\u00fchleisen, and Stefan Manegold. 2018. Deep Integration of Machine Learning Into Column Stores. In Proceedings of the 21st International Conference on Extending Database Technology (EDBT). 473--476."},{"key":"e_1_2_2_64_1","doi-asserted-by":"publisher","DOI":"10.1145\/2949689.2949703"},{"key":"e_1_2_2_65_1","doi-asserted-by":"publisher","DOI":"10.1145\/3299869.3320212"},{"key":"e_1_2_2_66_1","doi-asserted-by":"publisher","DOI":"10.1145\/3186728.3164140"},{"key":"e_1_2_2_67_1","unstructured":"Rathijit Sen. 2024. Inference of ML Models in SQL Server via External Languages. https:\/\/techcommunity.microsoft.com\/t5\/sql-server-blog\/inference-of-ml-models-in-sql-server-via-external-languages\/ba-p\/2216226."},{"key":"e_1_2_2_68_1","doi-asserted-by":"publisher","DOI":"10.14778\/3415478.3415515"},{"key":"e_1_2_2_69_1","doi-asserted-by":"publisher","DOI":"10.14778\/3685800.3685802"},{"key":"e_1_2_2_70_1","volume-title":"PyTond: Efficient Python Data Science on the Shoulders of Databases. In 2024 IEEE 40th International Conference on Data Engineering (ICDE). 423--435","author":"Shahrokhi Hesam","year":"2024","unstructured":"Hesam Shahrokhi, Amirali Kaboli, Mahdi Ghorbani, and Amir Shaikhha. 2024. PyTond: Efficient Python Data Science on the Shoulders of Databases. In 2024 IEEE 40th International Conference on Data Engineering (ICDE). 423--435."},{"key":"e_1_2_2_71_1","volume-title":"Push versus pull-based loop fusion in query engines. Journal of Functional Programming 28","author":"Shaikhha Amir","year":"2018","unstructured":"Amir Shaikhha, Mohammad Dashti, and Christoph Koch. 2018. Push versus pull-based loop fusion in query engines. Journal of Functional Programming 28 (2018)."},{"key":"e_1_2_2_72_1","doi-asserted-by":"publisher","DOI":"10.1145\/3527333"},{"key":"e_1_2_2_73_1","doi-asserted-by":"publisher","DOI":"10.14778\/3510397.3510408"},{"key":"e_1_2_2_74_1","unstructured":"SparkSQL. 2024. Apache Arrow in PySpark. https:\/\/spark.apache.org\/docs\/latest\/api\/python\/user_guide\/sql\/arrow_pandas.html."},{"key":"e_1_2_2_75_1","doi-asserted-by":"publisher","DOI":"10.1145\/3448016.3457244"},{"key":"e_1_2_2_76_1","unstructured":"Statsmodels. 2024. Statsmodels Document. https:\/\/www.statsmodels.org\/stable\/index.html."},{"key":"e_1_2_2_77_1","volume-title":"Revisited. In Proceedings of the 2018 International Conference on Management of Data (SIGMOD). 307--322","author":"Tahboub Ruby Y.","year":"2018","unstructured":"Ruby Y. Tahboub, Gr\u00e9gory M. Essertel, and Tiark Rompf. 2018. How to Architect a Query Compiler, Revisited. In Proceedings of the 2018 International Conference on Management of Data (SIGMOD). 307--322."},{"key":"e_1_2_2_78_1","doi-asserted-by":"publisher","DOI":"10.1145\/3589785"},{"key":"e_1_2_2_79_1","doi-asserted-by":"publisher","DOI":"10.1145\/3514221.3526142"},{"key":"e_1_2_2_80_1","doi-asserted-by":"publisher","DOI":"10.14778\/3611540.3611560"},{"key":"e_1_2_2_81_1","doi-asserted-by":"publisher","DOI":"10.14778\/3554821.3554830"},{"key":"e_1_2_2_82_1","doi-asserted-by":"publisher","DOI":"10.14778\/3503585.3503596"},{"key":"e_1_2_2_83_1","volume-title":"2024 USENIX Annual Technical Conference (USENIX ATC 24)","author":"Zhang Chen","year":"2024","unstructured":"Chen Zhang, Rongchao Dong, Haojie Wang, Runxin Zhong, Jike Chen, and Jidong Zhai. 2024. MAGPY: Compiling Eager Mode DNN Programs by Monitoring Execution States. In 2024 USENIX Annual Technical Conference (USENIX ATC 24). 683--698."},{"key":"e_1_2_2_84_1","doi-asserted-by":"publisher","DOI":"10.1145\/3626246.3654754"}],"container-title":["Proceedings of the ACM on Management of Data"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3725326","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,3,31]],"date-time":"2026-03-31T18:53:44Z","timestamp":1774983224000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3725326"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,6,17]]},"references-count":84,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2025,6,17]]}},"alternative-id":["10.1145\/3725326"],"URL":"https:\/\/doi.org\/10.1145\/3725326","relation":{},"ISSN":["2836-6573"],"issn-type":[{"value":"2836-6573","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,6,17]]}}}