Article(id=1329457088293614341, tenantId=1146029695717560320, journalId=1324759914146529478, issueId=1329456888623771822, articleNumber=null, orderNo=null, doi=10.7544/issn1000-1239.202330507, pmid=null, cstr=null, oa=null, hot=null, price=null, onlineType=0, articleFormat=0, articleType=null, articleTypeStr=null, receivedDate=1686758400000, receivedDateStr=2023-06-15, revisedDate=1704211200000, revisedDateStr=2024-01-03, acceptedDate=null, acceptedDateStr=null, onlineDate=1794896869967, onlineDateStr=2026-11-17, pubDate=1719763200000, pubDateStr=2024-07-01, doiRegisterDate=null, doiRegisterDateStr=null, onlineIssueDate=1794896869967, onlineIssueDateStr=2026-11-17, onlineJustAcceptDate=null, onlineJustAcceptDateStr=null, onlineFirstDate=null, onlineFirstDateStr=null, sourceXml=null, magXml=null, createTime=1794896869967, creator=13701087609, updateTime=1794896869967, updator=13701087609, issue=Issue{id=1329456888623771822, tenantId=1146029695717560320, journalId=1324759914146529478, year='2024', volume='61', issue='7', pageStart='1609', pageEnd='1862', issueExtLink='null', onlineDate='null', pubDate='1719763200000', pubDateStr='2024-07-01', beforeIssueId=null, nextIssueId=null, price=null, status=1, issueComplete=1, articleOrder=1, issueType=-1, specialIssue=null, createTime=1794896822361, creator='13701087609', updateTime=1794896822361, updator='13701087609', preIssue=null, nextIssue=null, articleTotal=null, ext=null, issueFiles=null, downloadFileDto=null}, startPage=1754, endPage=1770, ext={EN=ArticleExt(id=1329457088465580806, articleId=1329457088293614341, tenantId=1146029695717560320, journalId=1324759914146529478, language=EN, title=Advances in SQL Execution Techniques Based on Query Compilation, columnId=1329456889361969328, journalTitle=Journal of Computer Research and Development, columnName=Special Issue on Data-Driven Information System Services, runingTitle=null, highlight=null, articleAbstract=

Information systems usually use data management systems to manage data, among which SQL has been the mainstream query language for data management because of its ease of use and flexibility, and users can write SQL statements and submit them to the data management system to get query results. The efficiency of the execution model determines whether the system can quickly respond to user queries. The existing execution models mainly adopt interpreted execution and compiled execution. Interpreted execution is used by most systems due to its scalability and maintainability. Unlike interpreted execution, compiled execution generates efficient custom code to speed up queries that should have been processed by interpreted execution, and the significant performance gains have attracted a number of database systems to implement the technology. However, generating the corresponding custom code for a query is a complex process that requires a number of considerations, even in some cases, the performance of using compiled execution may not be as good as the traditional volcano model. We provide a systematic review of the progress of compiled execution techniques from conceptual and technical perspectives. Firstly, we outline the basic concepts of query compilation and introduce the relevant terminology and background knowledge. Secondly, we introduce the relevant techniques from three perspectives: intermediate code generation, intermediate representation, machine code generation and running. Finally, we look at the future development direction of compiled execution technology in the context of current research trends in data management systems and recent research work.

, authors=Qingfeng Pan1, Chen Xu1, 2, *, authorsList=Qingfeng Pan, Chen Xu, authorCompany=null, correspAuthors=Chen Xu, authorNote=

born in 1998. PhD candidate. His main research interest includes large-scale data processing systems

born in 1988. PhD, professor, PhD supervisor. Member of CCF. His main research interests include large-scale data processing systems, database systems, and intelligent computing systems

, correspAuthorsNote=null, copyrightStatement=Copyright © 2024 Journal of Computer Research and Development. All rights reserved., copyrightOwner=null, extLink=null, articleAbsUrl=null, sourceXml=null, magXml=null, pdfUrl=null, pdf=null, pdfFileSize=null, pdfExtLink=null, richHtmlUrl=null, mobilePdfUrl=null, reviewReport=null, pdfFirstPage=null, abstractGraph=null, abstractGraphContent=null, abstractVideo=null, citation=null, cebUrl=null, magXmlContent=null, mapNumber=null, fund=null), CN=ArticleExt(id=1329457092605358886, articleId=1329457088293614341, tenantId=1146029695717560320, journalId=1324759914146529478, language=CN, title=基于查询编译的SQL执行技术研究进展, columnId=1329456889512964274, journalTitle=计算机研究与发展, columnName=数据驱动的信息系统服务专题, runingTitle=null, highlight=null, articleAbstract=

信息系统通常会借助数据管理系统来进行数据管理,其中SQL凭借良好的易用性和灵活性一直作为数据管理的主流查询语言,用户将编写的SQL语句交由数据管理系统执行后便可得到查询结果. 执行模型的高效与否决定了系统能否快速响应用户的查询请求,现有执行模型主要采用解释执行和编译执行2种方式. 解释执行具有良好的拓展性、可维护性等因而被大多数系统采用. 不同于解释执行,编译执行为原本需要解释执行的查询生成高效的定制化代码来加速查询,带来的显著性能提升吸引了一众数据管理系统开始实现相应技术. 然而,如何针对查询生成其对应的定制化代码是一个复杂的过程,在实现时需要考虑诸多方面,甚至在某些情况下,采用编译执行的查询性能可能还不及传统的火山模型. 从概念、技术等角度系统地综述了编译执行技术的研究进展. 首先,概述了编译执行的基本概念,对相关术语和背景知识进行了介绍;其次,分别从中间代码生成、中间表示、机器码生成与运行3个角度介绍了相关技术;最后,结合当前数据管理系统的研究趋势以及近期研究工作展望了编译执行未来的发展方向.

, authors=潘青峰1, 徐辰1, 2, *, authorsList=潘青峰, 徐辰, authorCompany=null, correspAuthors=徐辰, authorNote=

1998年生. 博士研究生. 主要研究方向为大规模数据处理系统

1988年生. 博士,教授,博士生导师. CCF会员. 主要研究方向为大规模数据处理系统、数据库系统、智能计算系统

, correspAuthorsNote=
徐辰()
, copyrightStatement=版权所有 © 2024 计算机研究与发展编辑部, copyrightOwner=null, extLink=null, articleAbsUrl=null, sourceXml=mnSBkYIXSMeDqOeE4aJnrg==, magXml=pO+CWkTqlfTuPTv3geiRSw==, pdfUrl=null, pdf=zf9qaqkBBAnog2re5pwTeg==, pdfFileSize=1554395, pdfExtLink=null, richHtmlUrl=null, mobilePdfUrl=null, reviewReport=null, pdfFirstPage=null, abstractGraph=2ycyMNUFjjJl1KjNpT31wA==, abstractGraphContent=null, abstractVideo=null, citation=null, cebUrl=null, magXmlContent=whzXmUsrnNsB4Eqx+/ohMw==, mapNumber=null, fund=null)}, authors=[Author(id=1329457094496989998, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=qfpan@stu.ecnu.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329457094597653296, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, authorId=1329457094496989998, language=EN, stringName=Qingfeng Pan, firstName=Qingfeng, middleName=null, lastName=Pan, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1School of Data Science and Engineering, East China Normal University, Shanghai 200062, bio={"content":"

born in 1998. PhD candidate. His main research interest includes large-scale data processing systems

"}, bioImg=null, bioContent=

born in 1998. PhD candidate. His main research interest includes large-scale data processing systems

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329457094668956465, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, authorId=1329457094496989998, language=CN, stringName=潘青峰, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1华东师范大学数据科学与工程学院 上海 200062, bio={"img":"bxmzARrn+LlLXk5+9agO6A==","content":"

1998年生. 博士研究生. 主要研究方向为大规模数据处理系统

"}, bioImg=bxmzARrn+LlLXk5+9agO6A==, bioContent=

1998年生. 博士研究生. 主要研究方向为大规模数据处理系统

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329457092823462695, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, xref=1, ext=[AuthorCompanyExt(id=1329457092827657000, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092823462695, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1School of Data Science and Engineering, East China Normal University, Shanghai 200062), AuthorCompanyExt(id=1329457092836045609, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092823462695, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1华东师范大学数据科学与工程学院 上海 200062)])]), Author(id=1329457094748648243, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=cxu@dase.ecnu.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=1, authorType=1, ext={EN=AuthorExt(id=1329457094836728630, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, authorId=1329457094748648243, language=EN, stringName=Chen Xu, firstName=Chen, middleName=null, lastName=Xu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, *, address=1School of Data Science and Engineering, East China Normal University, Shanghai 200062
2Shanghai Engineering Research Center of Big Data Management System (East China Normal University), Shanghai 200062, bio={"content":"

born in 1988. PhD, professor, PhD supervisor. Member of CCF. His main research interests include large-scale data processing systems, database systems, and intelligent computing systems

"}, bioImg=null, bioContent=

born in 1988. PhD, professor, PhD supervisor. Member of CCF. His main research interests include large-scale data processing systems, database systems, and intelligent computing systems

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329457094920614711, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, authorId=1329457094748648243, language=CN, stringName=徐辰, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, *, address=1华东师范大学数据科学与工程学院 上海 200062
2上海市大数据管理系统工程研究中心(华东师范大学) 上海 200062, bio={"img":"PuQKzcU5MNupNWvE++ZclQ==","content":"

1988年生. 博士,教授,博士生导师. CCF会员. 主要研究方向为大规模数据处理系统、数据库系统、智能计算系统

"}, bioImg=PuQKzcU5MNupNWvE++ZclQ==, bioContent=

1988年生. 博士,教授,博士生导师. CCF会员. 主要研究方向为大规模数据处理系统、数据库系统、智能计算系统

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329457092823462695, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, xref=1, ext=[AuthorCompanyExt(id=1329457092827657000, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092823462695, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1School of Data Science and Engineering, East China Normal University, Shanghai 200062), AuthorCompanyExt(id=1329457092836045609, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092823462695, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1华东师范大学数据科学与工程学院 上海 200062)]), AuthorCompany(id=1329457092911543082, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, xref=2, ext=[AuthorCompanyExt(id=1329457092919931691, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092911543082, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2Shanghai Engineering Research Center of Big Data Management System (East China Normal University), Shanghai 200062), AuthorCompanyExt(id=1329457092924125996, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092911543082, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2上海市大数据管理系统工程研究中心(华东师范大学) 上海 200062)])])], keywords=[Keyword(id=1329457095038055224, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, orderNo=1, keyword=data management system), Keyword(id=1329457095105164089, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, orderNo=2, keyword=query execution), Keyword(id=1329457095180661562, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, orderNo=3, keyword=code generation), Keyword(id=1329457095256159035, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, orderNo=4, keyword=compiler), Keyword(id=1329457095319073596, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, orderNo=5, keyword=just-in-time compilation), Keyword(id=1329457095386182461, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, orderNo=1, keyword=数据管理系统), Keyword(id=1329457095449097022, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, orderNo=2, keyword=查询执行), Keyword(id=1329457095562343231, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, orderNo=3, keyword=代码生成), Keyword(id=1329457095667200832, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, orderNo=4, keyword=编译器), Keyword(id=1329457095730115393, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, orderNo=5, keyword=即时编译)], refs=[Reference(id=1329457100004111201, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=1, rfOrder=0, authorNames=null, journalName=null, refType=null, unstructuredReference=Kersten T, Leis V, Kemper A, et al. Everything you always wanted to know about compiled and vectorized queries but were afraid to ask[J]. Proceedings of the VLDB Endowment, 2018, 11(13): 2209−2222, articleTitle=null, refAbstract=null), Reference(id=1329457100188660578, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=2, rfOrder=1, authorNames=null, journalName=null, refType=null, unstructuredReference=Boncz P A, Zukowski M, Nes N. MonetDB/X100: Hyper-pipelining query execution[C/OL]//Proc of the 2nd Conf on Innovative Data Systems Research (CIDR). 2005 [2023-11-28].https://www.cidrdb.org/cidr2005/papers/P19.pdf, articleTitle=null, refAbstract=null), Reference(id=1329457100285129571, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=3, rfOrder=2, authorNames=null, journalName=null, refType=null, unstructuredReference=Raposa R, Roscigno D, Bragin T, et al. Distinctive features of ClickHouse [EB/OL]. [2023-06-13].https://clickhouse.com/docs/en/about-us/distinctive-features#vector-engine, articleTitle=null, refAbstract=null), Reference(id=1329457100377404260, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=4, rfOrder=3, authorNames=null, journalName=null, refType=null, unstructuredReference=Garcia-Molina H, Ullman J D, Widom J. Database System Implementation Second Edition[M]. Upper Saddle River: Prentice Hall, 2010: 759−760, articleTitle=null, refAbstract=null), Reference(id=1329457100465484645, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=5, rfOrder=4, authorNames=null, journalName=null, refType=null, unstructuredReference=Chamberlin D D, Astrahan M M, Blasgen M W, et al. A history and evaluation of System R[J]. Communications of the ACM, 1981, 24(10): 632−646, articleTitle=null, refAbstract=null), Reference(id=1329457100536787814, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=6, rfOrder=5, authorNames=null, journalName=null, refType=null, unstructuredReference=Neumann T. Efficiently compiling efficient query plans for modern hardware[J]. Proceedings of the VLDB Endowment, 2011, 4(9): 539−550, articleTitle=null, refAbstract=null), Reference(id=1329457100599702375, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=7, rfOrder=6, authorNames=null, journalName=null, refType=null, unstructuredReference=Klonatos Y, Koch C, Rompf T, et al. Building efficient query engines in a high-level language[J]. Proceedings of the VLDB Endowment, 2014, 7(10): 853−864, articleTitle=null, refAbstract=null), Reference(id=1329457100700365673, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=8, rfOrder=7, authorNames=null, journalName=null, refType=null, unstructuredReference=Tahboub R Y, Essertel G M, Rompf T. How to architect a query compiler, revisited[C]//Proc of the 2018 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2018: 307−322, articleTitle=null, refAbstract=null), Reference(id=1329457100754891627, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=9, rfOrder=8, authorNames=null, journalName=null, refType=null, unstructuredReference=PostgreSQL Community. What is JIT compilation [EB/OL]. [2023-08-17].https://www.postgresql.org/docs/current/jit-reason.html, articleTitle=null, refAbstract=null), Reference(id=1329457100847166316, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=10, rfOrder=9, authorNames=null, journalName=null, refType=null, unstructuredReference=OceanBase Community. ob_enable_jit [EB/OL]. [2023-08-17].https://en.oceanbase.com/docs/common-oceanbase-database-10000000000931187, articleTitle=null, refAbstract=null), Reference(id=1329457100905886573, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=11, rfOrder=10, authorNames=null, journalName=null, refType=null, unstructuredReference=openGauss Community. Other optimizer options [EB/OL]. [2023-08-17].https://docs.opengauss.org/en/docs/1.0.0/docs/Developerguide/other-optimizer-options.html, articleTitle=null, refAbstract=null), Reference(id=1329457100964606830, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=12, rfOrder=11, authorNames=null, journalName=null, refType=null, unstructuredReference=Armbrust M, Xin R S, Lian Cheng, et al. Spark SQL: Relational data processing in Spark[C]//Proc of the 2015 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2015: 1383−1394, articleTitle=null, refAbstract=null), Reference(id=1329457101035909999, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=13, rfOrder=12, authorNames=null, journalName=null, refType=null, unstructuredReference=Agarwal S, Liu D, Xin R. Apache Spark as a compiler: Joining a billion rows per second on a laptop[EB/OL]. [2023-06-13].https://databricks.com/blog/2016/05/23/apache-spark-as-a-compiler-joining-a-billion-rows-per-second-on-a-laptop.html, articleTitle=null, refAbstract=null), Reference(id=1329457101103018864, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=14, rfOrder=13, authorNames=null, journalName=null, refType=null, unstructuredReference=Prout A, Wang S P, Victor J, et al. Cloud-native transactions and analytics in SingleStore[C]//Proc of the 2022 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2022: 2340−2352, articleTitle=null, refAbstract=null), Reference(id=1329457101170127729, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=15, rfOrder=14, authorNames=null, journalName=null, refType=null, unstructuredReference=Palkar S, Thomas J, Narayanan D, et al. Evaluating end-to-end optimization for data analytics applications in Weld[J]. Proceedings of the VLDB Endowment, 2018, 11(9): 1002−1015, articleTitle=null, refAbstract=null), Reference(id=1329457101245625202, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=16, rfOrder=15, authorNames=null, journalName=null, refType=null, unstructuredReference=Kersten T, Leis V, Neumann T. Tidy tuples and flying start: Fast compilation and fast execution of relational queries in Umbra[J]. The VLDB Journal, 2021, 30(5): 883−905, articleTitle=null, refAbstract=null), Reference(id=1329457101337899891, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=17, rfOrder=16, authorNames=null, journalName=null, refType=null, unstructuredReference=Neumann T. Evolution of a compiling query engine[J]. Proceedings of the VLDB Endowment, 2021, 14(12): 3207−3210, articleTitle=null, refAbstract=null), Reference(id=1329457101421785972, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=18, rfOrder=17, authorNames=null, journalName=null, refType=null, unstructuredReference=Viglas S D. Just-in-time compilation for SQL query processing[C]//Proc of the 30th IEEE Int Conf on Data Engineering (ICDE). Piscataway, NJ: IEEE, 2014: 1298−1301, articleTitle=null, refAbstract=null), Reference(id=1329457101488894837, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=19, rfOrder=18, authorNames=null, journalName=null, refType=null, unstructuredReference=Melnik D, Buchatskiy R, Zhuykov R, et al. JIT-compiling SQL queries in PostgreSQL using LLVM [EB/OL]. [2023-06-13].https://www.pgcon.org/2017/schedule/events/1092.en.html, articleTitle=null, refAbstract=null), Reference(id=1329457101556003702, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=20, rfOrder=19, authorNames=null, journalName=null, refType=null, unstructuredReference=Kornacker M, Behm A, Bittorf V, et al. Impala: A modern, open-source SQL engine for Hadoop[C/OL]//Proc of the 7th Conf on Innovative Data Systems Research (CIDR). 2015[2023-11-28].https://www.cidrdb.org/cidr2015/Papers/CIDR15_Paper28.pdf, articleTitle=null, refAbstract=null), Reference(id=1329457101627306871, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=21, rfOrder=20, authorNames=null, journalName=null, refType=null, unstructuredReference=Krikellas K, Viglas S D, Cintra M. Generating code for holistic query evaluation[C]//Proc of the 26th IEEE Int Conf on Data Engineering (ICDE). Piscataway, NJ: IEEE, 2010: 613−624, articleTitle=null, refAbstract=null), Reference(id=1329457101740553080, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=22, rfOrder=21, authorNames=null, journalName=null, refType=null, unstructuredReference=Funke H, Teubner J. Data-parallel query processing on non-uniform data[J]. Proceedings of the VLDB Endowment, 2020, 13(6): 884−897, articleTitle=null, refAbstract=null), Reference(id=1329457103367943033, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=23, rfOrder=22, authorNames=null, journalName=null, refType=null, unstructuredReference=Yang Zhenhua, Pan Qingfeng, Xu Chen. Fine-grained tuple transfer for pipelined query execution on CPU-GPU coprocessor[C]//Proc of the 28th Int Conf on Database Systems for Advanced Applications (DASFAA). Berlin: Springer, 2023: 19−34, articleTitle=null, refAbstract=null), Reference(id=1329457103447634810, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=24, rfOrder=23, authorNames=null, journalName=null, refType=null, unstructuredReference=Foufoulas Y, Simitsis A, Stamatogiannakis L, et al. YeSQL: “You extend SQL” with rich and highly performant user-defined functions in relational databases[J]. Proceedings of the VLDB Endowment, 2022, 15(10): 2270−2283, articleTitle=null, refAbstract=null), Reference(id=1329457103569269627, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=25, rfOrder=24, authorNames=null, journalName=null, refType=null, unstructuredReference=Kläbe S, DeSantis R, Hagedorn S, et al. Accelerating Python UDFs in vectorized query execution[C/OL]//Proc of the 12th Conf on Innovative Data Systems Research (CIDR). 2022 [2023-09-19].https://www.cidrdb.org/cidr2022/papers/p33-klaebe.pdf, articleTitle=null, refAbstract=null), Reference(id=1329457103636378492, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=26, rfOrder=25, authorNames=null, journalName=null, refType=null, unstructuredReference=Hirn D, Grust T. PL/SQL without the PL[C]//Proc of the 2020 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2020: 2677−2680, articleTitle=null, refAbstract=null), Reference(id=1329457103732847485, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=27, rfOrder=26, authorNames=null, journalName=null, refType=null, unstructuredReference=Ramachandra K, Park K, Emani K V, et al. Froid: Optimization of imperative programs in a relational database[J]. Proceedings of the VLDB Endowment, 2017, 11(4): 432−444, articleTitle=null, refAbstract=null), Reference(id=1329457103804150654, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=28, rfOrder=27, authorNames=null, journalName=null, refType=null, unstructuredReference=Chen Hanfeng, D'silva J V, Chen Hongji, et al. HorseIR: Bringing array programming languages together with database query processing[C]//Proc of the 14th ACM SIGPLAN Int Symp on Dynamic Languages. New York: ACM, 2018: 37−49, articleTitle=null, refAbstract=null), Reference(id=1329457103892231039, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=29, rfOrder=28, authorNames=null, journalName=null, refType=null, unstructuredReference=Sichert M, Neumann T. User-defined operators: Efficiently integrating custom algorithms into modern databases[J]. Proceedings of the VLDB Endowment, 2022, 15(5): 1119−1131, articleTitle=null, refAbstract=null), Reference(id=1329457104005477248, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=30, rfOrder=29, authorNames=null, journalName=null, refType=null, unstructuredReference=Jungmair M, Kohn A, Giceva J. Designing an open framework for query optimization and compilation[J]. Proceedings of the VLDB Endowment, 2022, 15(11): 2389−2401, articleTitle=null, refAbstract=null), Reference(id=1329457104060003201, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=31, rfOrder=30, authorNames=null, journalName=null, refType=null, unstructuredReference=Chen Hanfeng, D'silva J V, Hendren L, et al. HorsePower: Accelerating database queries for advanced data analytics[C]//Proc of the 24th Int Conf on Extending Database Technology (EDBT). Berlin: Springer, 2021: 361−366, articleTitle=null, refAbstract=null), Reference(id=1329457104131306370, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=32, rfOrder=31, authorNames=null, journalName=null, refType=null, unstructuredReference=Crotty A, Galakatos A, Dursun K, et al. An architecture for compiling UDF-centric workflows[J]. Proceedings of the VLDB Endowment, 2015, 8(12): 1466−1477, articleTitle=null, refAbstract=null), Reference(id=1329457104198415235, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=33, rfOrder=32, authorNames=null, journalName=null, refType=null, unstructuredReference=Zhang Wangda, Kim J, Ross K A, et al. Adaptive code generation for data-intensive analytics[J]. Proceedings of the VLDB Endowment, 2021, 14(6): 929−942, articleTitle=null, refAbstract=null), Reference(id=1329457104286495620, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=34, rfOrder=33, authorNames=null, journalName=null, refType=null, unstructuredReference=Răducanu B, Boncz P, Zukowski M. Micro adaptivity in vectorwise[C]//Proc of the 2013 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2013: 1231−1242, articleTitle=null, refAbstract=null), Reference(id=1329457104366187397, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=35, rfOrder=34, authorNames=null, journalName=null, refType=null, unstructuredReference=Freedman C, Ismert E, Larson P Å. Compilation in the Microsoft SQL Server Hekaton engine[J]. Bulletin of the IEEE Computer Society Technical Committee on Data Engineering, 2014, 37(1): 22−30, articleTitle=null, refAbstract=null), Reference(id=1329457104433296262, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=36, rfOrder=35, authorNames=null, journalName=null, refType=null, unstructuredReference=Grulich P M, Sebastian B, Zeuch S, et al. Grizzly: Efficient stream processing through adaptive query compilation[C]//Proc of the 2020 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2020: 2487−2503, articleTitle=null, refAbstract=null), Reference(id=1329457104492016519, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=37, rfOrder=36, authorNames=null, journalName=null, refType=null, unstructuredReference=Sellis T K. Multiple-query optimization[J]. ACM Transactions on Database Systems, 1988, 13(1): 23−52, articleTitle=null, refAbstract=null), Reference(id=1329457104559125384, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=38, rfOrder=37, authorNames=null, journalName=null, refType=null, unstructuredReference=Armenatzoglou N, Basu S, Bhanoori N, et al. Amazon Redshift re-invented[C]//Proc of the 2022 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2022: 2205−2217, articleTitle=null, refAbstract=null), Reference(id=1329457104622039945, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=39, rfOrder=38, authorNames=null, journalName=null, refType=null, unstructuredReference=Rao J, Pirahesh H, Mohan C, et al. Compiled query execution engine using JVM[C]//Proc of the 22nd IEEE Int Conf on Data Engineering (ICDE). Piscataway, NJ: IEEE, 2006: 23−34, articleTitle=null, refAbstract=null), Reference(id=1329457104689148810, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=40, rfOrder=39, authorNames=null, journalName=null, refType=null, unstructuredReference=Meijer E, Beckman B, Bierman G. LINQ: Reconciling object, relations and XML in the .NET framework[C]//Proc of the 2006 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2006: 706−706, articleTitle=null, refAbstract=null), Reference(id=1329457104764646283, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=41, rfOrder=40, authorNames=null, journalName=null, refType=null, unstructuredReference=Nagel F, Bierman G, Viglas S D. Code generation for efficient query processing in managed runtimes[J]. Proceedings of the VLDB Endowment, 2014, 7(12): 1095−1106, articleTitle=null, refAbstract=null), Reference(id=1329457104840143756, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=42, rfOrder=41, authorNames=null, journalName=null, refType=null, unstructuredReference=Haas A, Rossberg A, Schuff D L, et al. Bringing the web up to speed with WebAssembly[C]//Proc of the 38th ACM SIGPLAN Conf on Programming Language Design and Implementation. New York: ACM, 2017: 185−200, articleTitle=null, refAbstract=null), Reference(id=1329457104903058317, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=43, rfOrder=42, authorNames=null, journalName=null, refType=null, unstructuredReference=LLVM Community. Class template reference [EB/OL]. [2023-06-13]. http://llvm.org/docs/doxygen/html/classllvm_1_1IRBuilder.html, articleTitle=null, refAbstract=null), Reference(id=1329457104961778574, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=44, rfOrder=43, authorNames=null, journalName=null, refType=null, unstructuredReference=Haffner I, Dittrich J. A simplified architecture for fast, adaptive compilation and execution of SQL queries[C]//Proc of the 26th Int Conf on Extending Database Technology (EDBT). Berlin: Springer, 2023: 1−13, articleTitle=null, refAbstract=null), Reference(id=1329457105033081743, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=45, rfOrder=44, authorNames=null, journalName=null, refType=null, unstructuredReference=Bynens M, Steiner T, Sharma U, et al. What is V8 [EB/OL]. [2023-06-13].https://v8.dev, articleTitle=null, refAbstract=null), Reference(id=1329457105104384912, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=46, rfOrder=45, authorNames=null, journalName=null, refType=null, unstructuredReference=SQLite Consortium. The SQLite bytecode engine [EB/OL]. [2023-06-13].https://www.sqlite.org/opcode.html, articleTitle=null, refAbstract=null), Reference(id=1329457105188270993, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=47, rfOrder=46, authorNames=null, journalName=null, refType=null, unstructuredReference=Lattner C, Amini M, Bondhugula U, et al. MLIR: Scaling compiler infrastructure for domain specific computation[C]//Proc of the 19th Int Symp on Code Generation and Optimization (CGO). New York: ACM, 2021: 2−14, articleTitle=null, refAbstract=null), Reference(id=1329457105246991250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=48, rfOrder=47, authorNames=null, journalName=null, refType=null, unstructuredReference=Gruber F, Bandle M, Engelke A, et al. Bringing compiling databases to RISC architectures[J]. Proceedings of the VLDB Endowment, 2023, 16(6): 1222−1234, articleTitle=null, refAbstract=null), Reference(id=1329457105309905811, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=49, rfOrder=48, authorNames=null, journalName=null, refType=null, unstructuredReference=Shaikhha A, Klonatos Y, Parreaux L, et al. How to architect a query compiler[C]//Proc of the 2016 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2016: 1907−1922, articleTitle=null, refAbstract=null), Reference(id=1329457105381208980, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=50, rfOrder=49, authorNames=null, journalName=null, refType=null, unstructuredReference=Gubner T, Boncz P. Excalibur: A virtual machine for adaptive fine-grained JIT-compiled query execution based on VOILA[J]. Proceedings of the VLDB Endowment, 2022, 16(4): 829−841, articleTitle=null, refAbstract=null), Reference(id=1329457105448317845, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=51, rfOrder=50, authorNames=null, journalName=null, refType=null, unstructuredReference=Gubner T, Boncz P. Charting the design space of query execution using VOILA[J]. Proceedings of the VLDB Endowment, 2021, 14(6): 1067−1079, articleTitle=null, refAbstract=null), Reference(id=1329457105528009622, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=52, rfOrder=51, authorNames=null, journalName=null, refType=null, unstructuredReference=MLIR Community. MLIR language reference: Dialects [EB/OL]. [2023-12-15].https://mlir.llvm.org/docs/LangRef/#dialects, articleTitle=null, refAbstract=null), Reference(id=1329457105620284311, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=53, rfOrder=52, authorNames=null, journalName=null, refType=null, unstructuredReference=Kohn A, Leis V, Neumann T. Adaptive execution of compiled queries[C]//Proc of the 34th IEEE Int Conf on Data Engineering (ICDE). Piscataway, NJ: IEEE, 2018: 197−208, articleTitle=null, refAbstract=null), Reference(id=1329457105687393176, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=54, rfOrder=53, authorNames=null, journalName=null, refType=null, unstructuredReference=Menon P, Ngom A, Ma Lin, et al. Permutable compiled queries: Dynamically adapting compiled queries without recompiling[J]. Proceedings of the VLDB Endowment, 2020, 14(2): 101−113, articleTitle=null, refAbstract=null), Reference(id=1329457105746113433, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=55, rfOrder=54, authorNames=null, journalName=null, refType=null, unstructuredReference=Funke H, Mühlig J, Teubner J. Low-latency query compilation[J]. The VLDB Journal, 2022, 31(6): 1171−1184, articleTitle=null, refAbstract=null), Reference(id=1329457105825805210, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=56, rfOrder=55, authorNames=null, journalName=null, refType=null, unstructuredReference=Chen Tianqi, Moreau T, Jiang Ziheng, et al. TVM: An automated end-to-end optimizing compiler for deep learning[C]//Proc of the 13th USENIX Symp on Operating Systems Design and Implementation (OSDI). Berkeley, CA: USENIX Association, 2018: 578−594, articleTitle=null, refAbstract=null), Reference(id=1329457105884525467, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=57, rfOrder=56, authorNames=null, journalName=null, refType=null, unstructuredReference=Damme P, Birkenbach M, Bitsakos C, et al. DAPHNE: An open and extensible system infrastructure for integrated data analysis pipelines[C/OL]//Proc of the 12th Conf on Innovative Data Systems Research (CIDR). 2022 [2023-09-19].https://www.cidrdb.org/cidr2022/papers/p4-damme.pdf, articleTitle=null, refAbstract=null), Reference(id=1329457105955828636, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=58, rfOrder=57, authorNames=null, journalName=null, refType=null, unstructuredReference=Behm A, Palkar S, Agarwal U, et al. Photon: A fast query engine for lakehouse systems[C]//Proc of the 2022 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2022: 2326−2339, articleTitle=null, refAbstract=null), Reference(id=1329457106035520413, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=59, rfOrder=58, authorNames=null, journalName=null, refType=null, unstructuredReference=Kersten T, Neumann T. On another level: How to debug compiling query engines[C/OL]//Proc of the 8th Int Workshop on Testing Database Systems. New York: ACM, 2020[2023-11-28].https://dl.acm.org/doi/pdf/10.1145/3395032.3395321, articleTitle=null, refAbstract=null), Reference(id=1329457106098434974, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=60, rfOrder=59, authorNames=null, journalName=null, refType=null, unstructuredReference=Pirk H, Moll O, Zaharia M, et al. Voodoo-a vector algebra for portable database performance on modern hardware[J]. Proceedings of the VLDB Endowment, 2016, 9(14): 1707−1718, articleTitle=null, refAbstract=null), Reference(id=1329457106161349535, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=61, rfOrder=60, authorNames=null, journalName=null, refType=null, unstructuredReference=Chinta K, Li Quan, Kleider M, et al. Fast and predictable performance with serverless compilation using Amazon Redshift [EB/OL]. [2023-06-13].https://aws.amazon.com/cn/blogs/big-data/fast-and-predictable-performance-with-serverless-compilation-using-amazon-redshift/, articleTitle=null, refAbstract=null), Reference(id=1329457106220069792, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=62, rfOrder=61, authorNames=null, journalName=null, refType=null, unstructuredReference=Gubner T, Boncz P A. Highlighting the performance diversity of analytical queries using VOILA[C]//Proc of the 12th Int Workshop on Accelerating Analytics and Data Management Systems Using Modern Processor and Storage Architectures (ADMS). New York: ACM, 2021: 47−54, articleTitle=null, refAbstract=null)], funds=null, companyList=[AuthorCompany(id=1329457092823462695, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, xref=1, ext=[AuthorCompanyExt(id=1329457092827657000, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092823462695, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1School of Data Science and Engineering, East China Normal University, Shanghai 200062), AuthorCompanyExt(id=1329457092836045609, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092823462695, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1华东师范大学数据科学与工程学院 上海 200062)]), AuthorCompany(id=1329457092911543082, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, xref=2, ext=[AuthorCompanyExt(id=1329457092919931691, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092911543082, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2Shanghai Engineering Research Center of Big Data Management System (East China Normal University), Shanghai 200062), AuthorCompanyExt(id=1329457092924125996, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092911543082, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2上海市大数据管理系统工程研究中心(华东师范大学) 上海 200062)])], figs=[ArticleFig(id=1329457095872721730, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 1, caption=History of query compilation development, figureFileSmall=SF4iJlk1ZfAmDJ9GrWNXig==, figureFileBig=2ycyMNUFjjJl1KjNpT31wA==, tableContent=null), ArticleFig(id=1329457096036299587, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图1, caption=查询编译发展历程, figureFileSmall=SF4iJlk1ZfAmDJ9GrWNXig==, figureFileBig=2ycyMNUFjjJl1KjNpT31wA==, tableContent=null), ArticleFig(id=1329457096229237572, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 2, caption=Query processing, figureFileSmall=TQ1BqZM1tH8xItS/w8AWhA==, figureFileBig=pWTxNeXAJOmciJpeXuPfBA==, tableContent=null), ArticleFig(id=1329457096313123653, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图2, caption=查询处理流程, figureFileSmall=TQ1BqZM1tH8xItS/w8AWhA==, figureFileBig=pWTxNeXAJOmciJpeXuPfBA==, tableContent=null), ArticleFig(id=1329457096422175558, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 3, caption=Operator calls under two execution models, figureFileSmall=PkXU0NCr7unkFgFczxy57A==, figureFileBig=ETuaGKlv3HHCLZ/eNFHLMw==, tableContent=null), ArticleFig(id=1329457096522838855, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图3, caption=2种执行方式下的算子调用, figureFileSmall=PkXU0NCr7unkFgFczxy57A==, figureFileBig=ETuaGKlv3HHCLZ/eNFHLMw==, tableContent=null), ArticleFig(id=1329457096619307848, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 4, caption=Expression evaluation under two execution models, figureFileSmall=V55BYGKiUECuKSifcnJhGQ==, figureFileBig=sI7fFpxxAPOjidZsC8Fy0g==, tableContent=null), ArticleFig(id=1329457096694805321, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图4, caption=2种执行方式下的表达式计算, figureFileSmall=V55BYGKiUECuKSifcnJhGQ==, figureFileBig=sI7fFpxxAPOjidZsC8Fy0g==, tableContent=null), ArticleFig(id=1329457096761914186, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 5, caption=Illustration of query compilation execution, figureFileSmall=eakYIbQ7nuURiDmRZClw+A==, figureFileBig=eP5j288K6zpxjhaIOgkMww==, tableContent=null), ArticleFig(id=1329457096845800267, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图5, caption=查询编译执行示意图, figureFileSmall=eakYIbQ7nuURiDmRZClw+A==, figureFileBig=eP5j288K6zpxjhaIOgkMww==, tableContent=null), ArticleFig(id=1329457096925492044, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 6, caption=Code generation workflow, figureFileSmall=xkV1ZfPgU/1V6mecdEhm/w==, figureFileBig=Eny5M4XYGPsvrvwTRlMmcQ==, tableContent=null), ArticleFig(id=1329457097017766733, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图6, caption=代码生成工作流, figureFileSmall=xkV1ZfPgU/1V6mecdEhm/w==, figureFileBig=Eny5M4XYGPsvrvwTRlMmcQ==, tableContent=null), ArticleFig(id=1329457097084875598, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 7, caption=Data-centric code generation, figureFileSmall=bdQGYOFO7hq56B1425HZHA==, figureFileBig=lW8ntYbJp3FVhIf/Du/0yQ==, tableContent=null), ArticleFig(id=1329457097160373071, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图7, caption=数据为中心的代码生成, figureFileSmall=bdQGYOFO7hq56B1425HZHA==, figureFileBig=lW8ntYbJp3FVhIf/Du/0yQ==, tableContent=null), ArticleFig(id=1329457097256842064, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 8, caption=produce/consume code generation framework, figureFileSmall=XHLrhO+ymhf6JRjhTC9BHQ==, figureFileBig=ti+FACOeJYiVOz44Tp266g==, tableContent=null), ArticleFig(id=1329457098468995921, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图8, caption=produce/consume代码生成框架, figureFileSmall=XHLrhO+ymhf6JRjhTC9BHQ==, figureFileBig=ti+FACOeJYiVOz44Tp266g==, tableContent=null), ArticleFig(id=1329457098984895315, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 9, caption=Description languages and architecture of IR, figureFileSmall=Q1nhrd8kr8Cs4QcRd7NkCw==, figureFileBig=SfCotmzwq7Oqzjmj6VGkHQ==, tableContent=null), ArticleFig(id=1329457099068781396, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图9, caption=中间表示的描述语言和架构, figureFileSmall=Q1nhrd8kr8Cs4QcRd7NkCw==, figureFileBig=SfCotmzwq7Oqzjmj6VGkHQ==, tableContent=null), ArticleFig(id=1329457099131695957, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 10, caption=Illustration of different IRs, figureFileSmall=RwTttmneXw2K/bXutTDrCw==, figureFileBig=eBRSGuLGPdWN6SPr7rBwFg==, tableContent=null), ArticleFig(id=1329457099194610518, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图10, caption=不同中间表示示意图, figureFileSmall=RwTttmneXw2K/bXutTDrCw==, figureFileBig=eBRSGuLGPdWN6SPr7rBwFg==, tableContent=null), ArticleFig(id=1329457099282690903, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 11, caption=Compilation process of three types of languages, figureFileSmall=JYyY06tpouoSH6Uq8lgKZQ==, figureFileBig=9tpWe5w9ngq1Iuqxv1R9qg==, tableContent=null), ArticleFig(id=1329457099345605464, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图11, caption=3种语言的编译流程, figureFileSmall=JYyY06tpouoSH6Uq8lgKZQ==, figureFileBig=9tpWe5w9ngq1Iuqxv1R9qg==, tableContent=null), ArticleFig(id=1329457099408520025, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 12, caption=Architecture of multiple layer compiler, figureFileSmall=UdrgCZB2OY2bAyYEtMugqg==, figureFileBig=/kEVLB7bBf5/7+Q3n4p2dw==, tableContent=null), ArticleFig(id=1329457099471434586, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图12, caption=多层编译器架构, figureFileSmall=UdrgCZB2OY2bAyYEtMugqg==, figureFileBig=/kEVLB7bBf5/7+Q3n4p2dw==, tableContent=null), ArticleFig(id=1329457099534349147, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Figure 13, caption=Optimization for machine code generation and execution, figureFileSmall=G55BcPoLKYlZAfbYEG+8eQ==, figureFileBig=Yrm2ThegXTE/wo6OyaddZQ==, tableContent=null), ArticleFig(id=1329457099609846620, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=图13, caption=机器码生成时与运行时优化, figureFileSmall=G55BcPoLKYlZAfbYEG+8eQ==, figureFileBig=Yrm2ThegXTE/wo6OyaddZQ==, tableContent=null), ArticleFig(id=1329457099672761181, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Table 1, caption=

Features Comparison of Different IRs

, figureFileSmall=null, figureFileBig=null, tableContent=
类别中间表示编译速度执行速度复杂度
高级语言C慢快较低
Java 慢低
低级语言LLVM IR较慢快较高
自定义语言Umbra IR快较快高
), ArticleFig(id=1329457099744064350, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=表1, caption=

不同中间表示的特点对比

, figureFileSmall=null, figureFileBig=null, tableContent=
类别中间表示编译速度执行速度复杂度
高级语言C慢快较低
Java 慢低
低级语言LLVM IR较慢快较高
自定义语言Umbra IR快较快高
), ArticleFig(id=1329457099811173215, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=EN, label=Table 2, caption=

Comparison of Different Metrics for Data Management Systems Based on Query Compilation

, figureFileSmall=null, figureFileBig=null, tableContent=
中间表示架构系统年份中间表示延迟吞吐表达能力移植能力是否开源
单层HyPer[6]2011LLVM IR++++− − −−×
ReSQL[55]2020Flounder IR+++− − −++×
mutable[44]2023Wasm++++− − −−×
多层Hekaton[35]2013MAT,PIT,C− − −+++− −×
DBLAB/LB[49]2016Scala DSLs− − −++++− −×
LegoBase[7]2018Scala,C− − −+++− −×
Excalibur[50]2021VOILA− −+++++√
Umbra(低延迟)[16]2021Umbra IR+++++++++×
Umbra(高吞吐)[16]2021Umbra IR−+++−−×
LingoDB[30]2022MLIR− − −+++−√
), ArticleFig(id=1329457099890864992, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, language=CN, label=表2, caption=

基于查询编译的数据管理系统的不同指标对比

, figureFileSmall=null, figureFileBig=null, tableContent=
中间表示架构系统年份中间表示延迟吞吐表达能力移植能力是否开源
单层HyPer[6]2011LLVM IR++++− − −−×
ReSQL[55]2020Flounder IR+++− − −++×
mutable[44]2023Wasm++++− − −−×
多层Hekaton[35]2013MAT,PIT,C− − −+++− −×
DBLAB/LB[49]2016Scala DSLs− − −++++− −×
LegoBase[7]2018Scala,C− − −+++− −×
Excalibur[50]2021VOILA− −+++++√
Umbra(低延迟)[16]2021Umbra IR+++++++++×
Umbra(高吞吐)[16]2021Umbra IR−+++−−×
LingoDB[30]2022MLIR− − −+++−√
)], attaches=null, journal=Journal(id=1324759606947315908, delFlag=0, nameCn=计算机研究与发展, nameEn=Journal of Computer Research and Development, nameHistory1=null, nameHistory2=null, issn=1000-1239, eissn=null, cn=11-1777/TP, coden=null, periodic=0, language=CN, oaType=null, ccby=null, superviseOffice=null, ownerOffice=null, pubOffice=null, editorOffice=null, officeType=null, aims=null, clcCode=null, officeProv=null, officeCity=null, officeAddr=null, officeZip=null, officeEmail=null, officePhone=null, editDirector=null, officeDirector=null, officeDirectorPhone=null, officeStaffNum=null, officeEmpNum=null, coverPicUrl=k2l8zgqwstuxxevFX2qxVA==, journalPrice=null, startedYear=null, abbrevIsoEn=Journal of Computer Research and Development, journalRemark=null, publicationField=null, createdTime=1793776903141, updatedTime=1793850698612, createdBy=18614031015, updatedBy=13701087609, firstLetterCn=J, firstLetterEn=J, subjectCode=Electronic Information, subjectName=null, subjectCodeEn=Electronic Information, subjectNameEn=null, picCn=k2l8zgqwstuxxevFX2qxVA==, picEn=r6k0Ry+RD+c/VXj5QarmDw==, jcr=null, cjcr=null, exts=[JournalExt(id=1325069127710286688, language=CN, name=计算机研究与发展, nameHistory1=null, nameHistory2=null, managedBy=, sponsoredBy=, publishedBy=, editorOffice=, officeProv=null, officeCity=null, officeAddr=, officeZip=, editDirector=, officeDirector=null, officePhone=null, coverPicUrl=null, journalRemark=, submitArticleUrl=null, websiteUrl=, createdTime=1793850698640, updatedTime=1793850698640, createdBy=13701087609, updatedBy=13701087609, submissionGuidelinesUrl=, submissionAuthorUrl=https://crad.ict.ac.cn/journalx/authorLogOn.action, submissionEditorUrl=https://crad.ict.ac.cn/journalx/editorLogOn.action, submissionReviewUrl=https://crad.ict.ac.cn/journalx/expertLogOn.action, submissionCeEditorUrl=https://crad.ict.ac.cn/journalx/editorInChiefLogOn.action, submissionAeEditorUrl=, option={"copyright":""}), JournalExt(id=1325069127777395553, language=EN, name=Journal of Computer Research and Development, nameHistory1=null, nameHistory2=null, managedBy=, sponsoredBy=, publishedBy=, editorOffice=, officeProv=null, officeCity=null, officeAddr=, officeZip=, editDirector=, officeDirector=null, officePhone=null, coverPicUrl=null, journalRemark=, submitArticleUrl=null, websiteUrl=, createdTime=1793850698656, updatedTime=1793850698656, createdBy=13701087609, updatedBy=13701087609, submissionGuidelinesUrl=, submissionAuthorUrl=https://crad.ict.ac.cn/journalx/authorLogOn.action, submissionEditorUrl=https://crad.ict.ac.cn/journalx/editorLogOn.action, submissionReviewUrl=https://crad.ict.ac.cn/journalx/expertLogOn.action, submissionCeEditorUrl=https://crad.ict.ac.cn/journalx/editorInChiefLogOn.action, submissionAeEditorUrl=, option={"copyright":""})], databaseList=null, tenantJournalId=1324759914146529478, websiteList=[Website(id=1325070300139892771, webName=null, webTitle=null, webDomain=null, webCopyrigh=null, webIpcNo=null, seoTitle=null, seoKeywords=null, seoDescription=null, tenantJournalId=null, journalId=1324759914146529478, journalNameCn=null, journalNameEn=null, grayFlag=null, tenantId=1146029695717560320, platformId=null, journalGroupId=null, journalGroupNameCn=null, journalGroupNameEn=null, type=1, domain=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN, language=CN, createTime=1793850978169, createBy=18614031015, updateTime=1793851040259, updateBy=18614031015, name=计算机研究与发展-中文, tplId=1146099689490845704, title=计算机研究与发展, delFlag=0, indexPage=/home, props=[WebsiteProps(id=1325070893751349360, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=articleTextType, value=kx, createTime=1793851119697, updateTime=1793851119697, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893730377837, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=banner, value=null, createTime=1793851119692, updateTime=1793851119692, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893772320883, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=grayFlag, value=0, createTime=1793851119702, updateTime=1793851119702, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893721989228, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=logo, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/file/pic?fileId=U27tDsy717YF7XSPA+Vwdw==, createTime=1793851119690, updateTime=1793851119690, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893784903797, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=minRunFlag, value=0, createTime=1793851119705, updateTime=1793851119705, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893742960751, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=picServerUrl, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/file/pic, createTime=1793851119695, updateTime=1793851119695, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893780709492, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=silenceFlag, value=0, createTime=1793851119704, updateTime=1793851119704, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893738766446, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=staticResourcePath, value=https://castjournals.cast.org.cn/joweb/cast_kjdb_cn_619/, createTime=1793851119694, updateTime=1793851119694, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893755543665, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=themeColor, value=null, createTime=1793851119698, updateTime=1793851119698, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893763932274, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=themeStyle, value=null, createTime=1793851119700, updateTime=1793851119700, creator=18614031015, updator=18614031015)]), Website(id=1325070300580294698, webName=null, webTitle=null, webDomain=null, webCopyrigh=null, webIpcNo=null, seoTitle=null, seoKeywords=null, seoDescription=null, tenantJournalId=null, journalId=1324759914146529478, journalNameCn=null, journalNameEn=null, grayFlag=null, tenantId=1146029695717560320, platformId=null, journalGroupId=null, journalGroupNameCn=null, journalGroupNameEn=null, type=1, domain=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN, language=EN, createTime=1793850978274, createBy=18614031015, updateTime=1793851036638, updateBy=18614031015, name=计算机研究与发展-英文, tplId=1146101810881728533, title=Journal of Computer Research and Development, delFlag=0, indexPage=/home, props=[WebsiteProps(id=1325070925288321148, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=articleTextType, value=kx, createTime=1793851127216, updateTime=1793851127216, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925263155321, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=banner, value=null, createTime=1793851127210, updateTime=1793851127210, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925309292671, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=grayFlag, value=0, createTime=1793851127221, updateTime=1793851127221, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925254766712, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=logo, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/file/pic?fileId=U27tDsy717YF7XSPA+Vwdw==, createTime=1793851127208, updateTime=1793851127208, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925326069889, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=minRunFlag, value=0, createTime=1793851127225, updateTime=1793851127225, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925279932539, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=picServerUrl, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/file/pic, createTime=1793851127214, updateTime=1793851127214, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925317681280, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=silenceFlag, value=0, createTime=1793851127223, updateTime=1793851127223, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925271543930, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=staticResourcePath, value=https://castjournals.cast.org.cn/joweb/cast_kjdb_en_623/, createTime=1793851127212, updateTime=1793851127212, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925292515453, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=themeColor, value=null, createTime=1793851127217, updateTime=1793851127217, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925300904062, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=themeStyle, value=null, createTime=1793851127219, updateTime=1793851127219, creator=18614031015, updator=18614031015)])], journalTitle=计算机研究与发展, weixinUrl=null, journalUrl=https://crad.ict.ac.cn/, iacademicId=null, status=1, seqNo=null, journalTitleEn=Journal of Computer Research and Development, journalPhotoCn=k2l8zgqwstuxxevFX2qxVA==, journalPhotoEn=r6k0Ry+RD+c/VXj5QarmDw==, journalFirstLetter=J, journalRecommend=null, journalNew=null, journalCollection=null, jcrJf=null, cjcrJf=null, jcrJfStr=null, cjcrJfStr=null, submissionFirstDecision=null, sciSubjectClassification=null, casSubjectClassification=null, citeScore=null, totalCitationFrequency=null, icpCode=null, psCode=null, advertisingLicenseCode=null, copyrightInformation=null, country=null, option=, provinceCode=null, provinceName=null, collectFlag=false, interPubPlatform=, interPubPlatformUrl=null), detailUrlCn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/10.7544/issn1000-1239.202330507, detailUrlEn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/10.7544/issn1000-1239.202330507, pdfUrlCn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/PDF/10.7544/issn1000-1239.202330507, pdfUrlEn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/PDF/10.7544/issn1000-1239.202330507, aliStartDate=0, aliEndDate=0, collectionFlag=false, citedCount=null, citedUrl=null, previewStatus=0, delFlag=0, hasFullText=1, orderTime=1719763200000, fullTextJson=null, articleText=null, reference=null)
收藏切换
基于查询编译的SQL执行技术研究进展
潘青峰 1 , 徐辰 1, 2, *
计算机研究与发展 | 数据驱动的信息系统服务专题 2024,61(7): 1754-1770
收起
收藏切换
计算机研究与发展 |数据驱动的信息系统服务专题 2024 , 61 (7) : 1754 -1770
基于查询编译的SQL执行技术研究进展
全屏
[Author(id=1329457094496989998, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=qfpan@stu.ecnu.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329457094597653296, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, authorId=1329457094496989998, language=EN, stringName=Qingfeng Pan, firstName=Qingfeng, middleName=null, lastName=Pan, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1School of Data Science and Engineering, East China Normal University, Shanghai 200062, bio={"content":"

born in 1998. PhD candidate. His main research interest includes large-scale data processing systems

"}, bioImg=null, bioContent=

born in 1998. PhD candidate. His main research interest includes large-scale data processing systems

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329457094668956465, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, authorId=1329457094496989998, language=CN, stringName=潘青峰, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1华东师范大学数据科学与工程学院 上海 200062, bio={"img":"bxmzARrn+LlLXk5+9agO6A==","content":"

1998年生. 博士研究生. 主要研究方向为大规模数据处理系统

"}, bioImg=bxmzARrn+LlLXk5+9agO6A==, bioContent=

1998年生. 博士研究生. 主要研究方向为大规模数据处理系统

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329457092823462695, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, xref=1, ext=[AuthorCompanyExt(id=1329457092827657000, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092823462695, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1School of Data Science and Engineering, East China Normal University, Shanghai 200062), AuthorCompanyExt(id=1329457092836045609, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092823462695, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1华东师范大学数据科学与工程学院 上海 200062)])]), Author(id=1329457094748648243, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=cxu@dase.ecnu.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=1, authorType=1, ext={EN=AuthorExt(id=1329457094836728630, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, authorId=1329457094748648243, language=EN, stringName=Chen Xu, firstName=Chen, middleName=null, lastName=Xu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, *, address=1School of Data Science and Engineering, East China Normal University, Shanghai 200062
2Shanghai Engineering Research Center of Big Data Management System (East China Normal University), Shanghai 200062, bio={"content":"

born in 1988. PhD, professor, PhD supervisor. Member of CCF. His main research interests include large-scale data processing systems, database systems, and intelligent computing systems

"}, bioImg=null, bioContent=

born in 1988. PhD, professor, PhD supervisor. Member of CCF. His main research interests include large-scale data processing systems, database systems, and intelligent computing systems

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329457094920614711, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, authorId=1329457094748648243, language=CN, stringName=徐辰, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, *, address=1华东师范大学数据科学与工程学院 上海 200062
2上海市大数据管理系统工程研究中心(华东师范大学) 上海 200062, bio={"img":"PuQKzcU5MNupNWvE++ZclQ==","content":"

1988年生. 博士,教授,博士生导师. CCF会员. 主要研究方向为大规模数据处理系统、数据库系统、智能计算系统

"}, bioImg=PuQKzcU5MNupNWvE++ZclQ==, bioContent=

1988年生. 博士,教授,博士生导师. CCF会员. 主要研究方向为大规模数据处理系统、数据库系统、智能计算系统

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329457092823462695, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, xref=1, ext=[AuthorCompanyExt(id=1329457092827657000, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092823462695, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1School of Data Science and Engineering, East China Normal University, Shanghai 200062), AuthorCompanyExt(id=1329457092836045609, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092823462695, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1华东师范大学数据科学与工程学院 上海 200062)]), AuthorCompany(id=1329457092911543082, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, xref=2, ext=[AuthorCompanyExt(id=1329457092919931691, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092911543082, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2Shanghai Engineering Research Center of Big Data Management System (East China Normal University), Shanghai 200062), AuthorCompanyExt(id=1329457092924125996, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329457088293614341, companyId=1329457092911543082, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2上海市大数据管理系统工程研究中心(华东师范大学) 上海 200062)])])]
潘青峰1 , 徐辰1, 2, *
作者信息
  • 1华东师范大学数据科学与工程学院 上海 200062
  • 2上海市大数据管理系统工程研究中心(华东师范大学) 上海 200062
通讯作者:
作者简介:

1998年生. 博士研究生. 主要研究方向为大规模数据处理系统

1988年生. 博士,教授,博士生导师. CCF会员. 主要研究方向为大规模数据处理系统、数据库系统、智能计算系统

Advances in SQL Execution Techniques Based on Query Compilation
Qingfeng Pan1 , Chen Xu1, 2, *
Affiliations
  • 1School of Data Science and Engineering, East China Normal University, Shanghai 200062
  • 2Shanghai Engineering Research Center of Big Data Management System (East China Normal University), Shanghai 200062
  • born in 1998. PhD candidate. His main research interest includes large-scale data processing systems

    born in 1988. PhD, professor, PhD supervisor. Member of CCF. His main research interests include large-scale data processing systems, database systems, and intelligent computing systems

出版时间: 2024-07-01 doi: 10.7544/issn1000-1239.202330507
文章导航
收藏切换

信息系统通常会借助数据管理系统来进行数据管理,其中SQL凭借良好的易用性和灵活性一直作为数据管理的主流查询语言,用户将编写的SQL语句交由数据管理系统执行后便可得到查询结果. 执行模型的高效与否决定了系统能否快速响应用户的查询请求,现有执行模型主要采用解释执行和编译执行2种方式. 解释执行具有良好的拓展性、可维护性等因而被大多数系统采用. 不同于解释执行,编译执行为原本需要解释执行的查询生成高效的定制化代码来加速查询,带来的显著性能提升吸引了一众数据管理系统开始实现相应技术. 然而,如何针对查询生成其对应的定制化代码是一个复杂的过程,在实现时需要考虑诸多方面,甚至在某些情况下,采用编译执行的查询性能可能还不及传统的火山模型. 从概念、技术等角度系统地综述了编译执行技术的研究进展. 首先,概述了编译执行的基本概念,对相关术语和背景知识进行了介绍;其次,分别从中间代码生成、中间表示、机器码生成与运行3个角度介绍了相关技术;最后,结合当前数据管理系统的研究趋势以及近期研究工作展望了编译执行未来的发展方向.

数据管理系统  /  查询执行  /  代码生成  /  编译器  /  即时编译

Information systems usually use data management systems to manage data, among which SQL has been the mainstream query language for data management because of its ease of use and flexibility, and users can write SQL statements and submit them to the data management system to get query results. The efficiency of the execution model determines whether the system can quickly respond to user queries. The existing execution models mainly adopt interpreted execution and compiled execution. Interpreted execution is used by most systems due to its scalability and maintainability. Unlike interpreted execution, compiled execution generates efficient custom code to speed up queries that should have been processed by interpreted execution, and the significant performance gains have attracted a number of database systems to implement the technology. However, generating the corresponding custom code for a query is a complex process that requires a number of considerations, even in some cases, the performance of using compiled execution may not be as good as the traditional volcano model. We provide a systematic review of the progress of compiled execution techniques from conceptual and technical perspectives. Firstly, we outline the basic concepts of query compilation and introduce the relevant terminology and background knowledge. Secondly, we introduce the relevant techniques from three perspectives: intermediate code generation, intermediate representation, machine code generation and running. Finally, we look at the future development direction of compiled execution technology in the context of current research trends in data management systems and recent research work.

data management system  /  query execution  /  code generation  /  compiler  /  just-in-time compilation
潘青峰, 徐辰. 基于查询编译的SQL执行技术研究进展. 计算机研究与发展, 2024 , 61 (7) : 1754 -1770 . DOI: 10.7544/issn1000-1239.202330507
Qingfeng Pan, Chen Xu. Advances in SQL Execution Techniques Based on Query Compilation[J]. Journal of Computer Research and Development, 2024 , 61 (7) : 1754 -1770 . DOI: 10.7544/issn1000-1239.202330507
数据作为当今时代的重要能源,加速了传统产业的转型升级,推动着新型产业如生成式AI的蓬勃发展. 如何有效管理海量数据,充分挖掘数据中的潜藏价值,从而支撑各行业信息系统的精准服务是数字化转型时期的关键问题. 信息系统通常会借助数据管理系统来进行数据管理,其中,SQL凭借良好的易用性和灵活性一直作为数据管理的主流查询语言. 用户通过编写简单的SQL语句,便能够在存储的数据上高效地进行查询与分析. 用户在编写完SQL语句后,需要将其交给对应的数据管理系统,系统会对输入的SQL语句进行解析、优化和执行,最终返回结果给用户. 在上述过程中,最为耗时的环节往往是查询执行,因此执行模型对于整个系统性能有着举足轻重的影响,其高效与否决定了系统能否快速响应用户的查询请求,从而满足信息系统精准服务的需求.
在早期的数据管理系统中,火山模型由于具有良好的拓展性、可维护性而被广泛采用,如SQL Server,PostgreSQL. 然而,火山模型在执行过程中存在大量虚函数调用、元组变形(tuple deforming)等处理过程,存在高额的解释开销. 在早期磁盘I/O为主要性能瓶颈的时代背景下,解释开销对查询性能的影响并不显著. 但在面向如内存数据库中的查询等CPU计算为性能瓶颈的负载时,火山模型已经无法满足查询所需的高吞吐和低延迟需求.
为了解决火山模型性能不佳的问题,现有数据管理系统采用2种策略来提高查询执行效率,即向量化和查询编译. 二者是针对火山模型的不同优化思路,存在不同的优势和弱势[1]. 本文聚焦于综述查询编译的相关技术. 其中,向量化采用和火山模型类似的解释方式,反复调用查询计划中各算子的迭代器,以“一次一批”的形式来均摊虚函数调用等带来的开销,如MonetDB/X100[2],ClickHouse[3]等,与火山模型都属于解释执行. 查询编译则通过为查询即时生成相应执行代码来避免传统火山模型中高额的解释开销,又称编译执行. 生成的代码在运行时避免了大量的函数调用并且能够高效利用处理器,因而提升了查询执行性能. 值得注意的是,在查询编译技术诞生之前,查询编译一词通常指将SQL查询转换为物理执行计划[4]. 随着编译执行技术的普及,大多数文献以及本文将该词特指为为物理执行计划生成对应的可执行文件.
近些年来,查询编译技术飞速发展. 为了满足各种需求,关于查询编译的研究不断推陈出新. 与此同时,越来越多的工业系统也开始将相关技术融入到自身执行引擎中. 查询编译发展至今已有40余年,其思想的出现可以追溯至System R[5]时期. 如图1所示,本文将查询编译的发展历程划分为3个时期:
1)萌芽期. 以System R中编译思想的出现为标志,查询编译的雏形悄然诞生. 随后在I/O为性能瓶颈的背景下,其并未广泛研究,一直缓慢发展. 该时期相关技术的主要目标都是降低解释执行的开销,同时构建查询编译系统相关的基础组件. 期间诞生了诸如HIQUE,JAMDB等查询编译数据库系统原型,为随后相关技术的发展奠定了基础.
2)发展期. Hyper[6]中以数据为中心的代码生成的出现标志着查询编译迈入发展阶段,该思想被随后的查询编译器广泛采用. 该时期研究工作主要方向转变为提升查询编译器的扩展性,包括优化架构和支持新硬件等. 期间诞生了LegoBase[7],LB2[8]等数据库系统原型,对随后查询编译器的架构产生了重要指导作用.
3)成熟期. 2015年左右,Spark SQL等工业系统逐步开始采用查询编译相关技术,标志着查询编译步入成熟期. PostgreSQL[9],OceanBase[10],openGauss[11]等数据库系统纷纷开始支持表达式上的代码生成,图1中的虚线方框表明该系统仅支持编译表达式等简单对象. Spark SQL[12-13],SingleStore[14]等系统则面向整个查询进行代码生成. 相关技术在工业界中的落地促进了查询编译基础组件的完善与成熟,但与此同时,系统的低延迟需求、融合机器学习的复杂分析的出现推动着该技术仍在不断发展. 近些年来一些研究工作因而转向支持复杂查询的性能需求等,如Weld[15],Umbra[16]等系统通过构建自定义中间表示来支持更高效的查询.
虽然查询编译核心技术已经趋于成熟,但是在具体实现时仍有诸多方面需要考虑,包括如何构建高效的代码生成器、如何选择合适的中间表示、如何避免额外的编译开销等,这些对于整个查询编译性能而言都有着至关重要的影响. 已经有相关综述文献对查询编译技术进行了介绍,文献[17]主要聚焦在单个系统上,文献[18]则综述了萌芽期的研究工作. 本文从查询编译的基本概念出发,按照SQL查询编译的执行流程综述了已有的查询编译技术,为相关研究人员提供参考.
查询执行模型主要采用解释执行与编译执行2种方式,其中编译执行又可称为查询编译. 解释执行具有良好的拓展性和可维护性,且采用向量化后也能兼具高效的处理性能,因而被大多数数据管理系统采用. 查询编译因为能够减少查询执行时所需的指令数量,更适合于缓存常驻型负载[1],也得到越来越多系统的关注与青睐. 二者同样作为系统的执行模块,如图2所示,既有相似部分,又有本质上不同的设计思想. 本节通过对比解释执行来介绍查询编译的基本概念,随后分析了查询编译的研究挑战和技术分类.
不同文献对于解释执行和编译执行的概念定义有所不同,为了更清晰准确地介绍相关技术,本文综合不同文献后,首先对二者进行如下定义. 解释执行是指以物理执行计划为输入,根据计划中算子间的调用关系连续地调用各算子预编译成可执行文件的通用算子计算单元来解释查询计划,查询执行过程中不会生成任何新的可执行文件. 编译执行是指以物理执行计划为输入,根据计划中算子间调用关系依次调用各算子的代码生成单元,为计划生成包含运算符语义、控制逻辑等的定制化代码,执行时需将该代码即时编译为可执行文件.
在解释执行过程中,上下游算子间通过调用彼此的next虚函数以“一次一元组”或“一次一批”的形式进行元组传递. 各个算子在获取到元组后,根据预先编译好的可执行文件中的计算逻辑对其进行处理,如图3(a)所示. 这种抽象与封装降低了研发人员在开发系统时的复杂度,也使执行模型具有良好的拓展性和可维护性.
然而,传统火山模型中存在的虚函数调用、元组变形等处理过程本身存在一定开销,导致CPU无法被充分利用. 当待处理元组较多时,频繁的虚函数调用等会显著影响查询性能. 虚函数调用本质是上下游算子间的逐级访问,元组变形则是按照关系表中的字段类型等将元组转换成内存中的表示,而这类信息在查询执行前是能够通过查询计划树结构和关系表结构等内容确定的. 查询编译因而结合此类信息为查询即时生成定制化的中间代码来避免上述开销,其处理过程如图2下方部分所示,分为代码生成阶段和机器码生成阶段. 在生成中间代码时,查询编译采用的也是与解释执行类似的树形结构,如图3(b)所示. 不同的是调用每个算子时不再是直接计算,而是以字符串拼接方式输出对应的逻辑代码,包括计算和控制逻辑等,所以在查询编译中查询执行代码是即时生成的.
以表达式计算为例,在解释执行中,用户输入的表达式通常被表示成如图4(a)所示的树形结构. 树中诸如“>”等各种类型表达式的计算,都是通过覆盖基类中的虚函数实现的,在计算时又会递归地调用子表达式. 然而,这些表达式的计算逻辑大多非常简单,如2个数字相加减,这导致调用虚函数等的开销甚至超过了计算本身的开销. 如果为用户输入的表达式生成如图4(b)所示的调用函数并对其进行内联,便可以避免虚函数调用开销. 同时,内联也可以使得通用编译器进一步采用子表达式消除等优化手段,进一步提高计算性能. 以SELECT COUNT(*) FROM tbl WHERE (x+y)>20这条查询为例,在PostgreSQL中,表达式(x+y)>20的计算在解释执行下占据了56%的执行时间. 而在编译执行下,表达式计算仅为查询总执行时间的6%,整条查询的执行速度也提高了2倍. 对于更为复杂的查询,如包含了连接等操作的TPC-H1,查询编译能给PostgreSQL带来5倍的性能提升. 对于包含了多表连接、聚合等复杂操作的TPC-H3,查询编译也能带来2倍的性能提升[19]. 但对于需要访问较大哈希表的查询而言,采用向量化可能会比采用查询编译具有更快的执行速度[1].
上述表达式计算的例子属于查询编译的简单应用,总的来说,查询编译通过代码生成器将用户输入的查询转换成高效且定制化的中间代码,包括定制化的数据结构、执行逻辑等. 该代码随后被GCC等通用编译器编译成可执行文件并交由运行时运行,运行时由于避免了原先火山模型中大量的函数调用等开销,因而提高了查询执行性能,甚至能够媲美专业人员手写代码的性能. 如图5所示,本文按照上述执行流程将中间代码生成、中间表示(intermediate representation,IR)、机器码生成与运行这3个层面的相关技术独立出来,分别介绍各自的研究挑战与解决方案.
本节从中间代码生成、中间表示、机器码生成与运行3个层面分析了查询编译引擎在设计与实现上的研究挑战. 代码生成、机器码生成与运行的研究挑战集中在如何提升系统吞吐或降低系统延迟. 中间表示作为承上启下的核心模块,研究挑战在于如何提高系统的可维护性与拓展性等.
1)代码生成层面. 如何生成执行速度接近最优手写代码的中间代码,同时保证代码生成器的通用性. 代码执行速度与代码逻辑息息相关,手动地为查询编写高效的代码逻辑本身并非易事,如何使生成的代码接近手写代码的执行速度则更加复杂. 此外,生成的代码越高效,对应的代码生成器的结构通常更为复杂,以至于不适用于其他系统. 因此如何兼具良好的通用性也是构建代码生成器需要解决的关键问题.
2)中间表示层面. 如何在可接受的编译延迟范围内,尽可能提高中间表示的表达能力. 中间表示作为查询编译的核心模块,需要兼具高效的编译速度和良好的表达能力. 高效的编译速度是指生成的中间代码能够迅速编译出机器码,以此降低查询编译的延迟. 良好的表达能力则意味着基于该中间表示,能够方便地生成高质量的中间代码. 然而,提升表达能力通常需要构建结构更复杂的中间表示,而此类中间表示又会增大编译延迟. 因此,在构建中间表示时需要考虑到二者间的制约关系.
3)机器码生成与运行层面. 如何在减小机器码生成带来的额外开销的同时,尽量不影响甚至提升随后代码运行时的性能. 在大多数情况下,查询编译能够给查询执行带来显著的性能提升. 但查询编译的一些特性产生的额外开销,如即时将中间代码编译成机器码引入的机器码生成开销,在某些情况下反倒会导致查询的整体性能不及传统的火山模型. 机器码生成的开销主要来自于优化过程,但如果通过减少优化步骤来降低机器码生成开销又会影响代码运行时的性能. 如何兼顾快速的机器码生成以及随后高效的代码运行,对于系统保证低延迟和高吞吐至关重要.
如图5所示,本节从3个层面归纳了查询编译的相关技术.
1)代码生成. 为了生成高效中间代码,不同数据管理系统会选择对查询中的表达式、算子以及用户自定义函数等部分进行代码生成. 此外,现有系统大多采用模板技术的变体生产与消费框架来构建自身的代码生成器,以此保证生成器的通用性.
2)中间表示. 通用编程语言领域中的各类语言或表示如C++,LLVM IR等,本身具有一定的表达能力,因此大部分系统会选择在此类通用编程语言或表示上构建单层的中间表示. 然而基于这种架构的中间表示的表达能力较弱,部分工作通过构建自定义表示在降低编译延迟的同时,提高中间表示的表达能力. 另一部分系统则在可接受的延迟范围内,通过构建多层中间表示来提高中间表示的表达能力.
3)机器码生成与运行. 为了在降低机器码生成开销的同时保证随后代码运行时的性能,现有工作从机器码的生成和运行2个阶段入手进行优化. 针对机器码生成的优化聚焦于通过代码缓存、编译器化简等技术来降低机器码生成的开销,并尽可能不影响代码运行性能. 针对机器码运行的优化则关注于在运行阶段通过通用或特定优化技术来提升代码运行时的性能.
总而言之,查询编译给查询执行带来新机遇的同时也引入了一些新的挑战. 接下来的3节将分别从代码生成、中间表示以及机器码生成与运行3个核心阶段入手,系统地介绍相关技术.
代码生成阶段的核心内容是通过代码生成器将优化后的整个或部分物理执行计划转换成高效、紧凑的定制化代码. 其中存在2个关键问题:一是面向各类计划节点如何生成性能最优的中间代码;二是针对整棵计划树,如何设计代码生成器框架,使其能够像解释执行中的火山模型一样具有良好的通用性.
如图6所示,物理计划中包含元组变形与表达式、算子以及用户自定义函数3类计划节点. 针对每类节点,可构造的代码内容多种多样,能否使生成代码的性能接近最优对于系统实现高吞吐至关重要. 在确定各节点的代码生成策略后,需要通过一套框架将这些代码整合起来,进而生成完整的、逻辑正确的中间代码. 早期的一些系统通常采用简单的代码模板技术来构建代码生成器框架,但是这种方式实现的代码生成器往往缺乏清晰的架构,通用性不佳,因而难以拓展或不便于其他系统借鉴. 本节首先介绍了针对不同计划节点的代码生成相关工作,随后概述了面向整棵计划树如何构建代码生成器框架.
一棵完整的物理计划树主要包括元组变形与表达式、关系算子以及用户自定义函数3类节点. 这3类节点在计算内容上差异较大,因此在代码生成时,需要根据节点类型来设计不同的代码生成策略.
在算子或表达式计算前,需要先将待处理元组转换成内存中的表示. 类似于反序列化,该过程将元组的各个字段转换成相应数据类型如整型、布尔型等. 由于待处理字段的类型只有在用户向系统提交查询后才能得知,为了能够应对各种类型数据的转换,解释执行下的转换过程在设计与实现时往往非常通用. 然而,这种通用性导致元组的转换过程存在冗余指令,当待处理元组过多时,转换的高效与否就会直接影响查询的性能. 查询编译则根据输入查询的字段信息,即时生成特定的转换函数,如针对整型和浮点型字段生成特定的整型或浮点型转换函数. 该函数消除了运行时不必要的指令以及变量[20],也可以进一步被内联,以此提高了查询性能.
表达式一般出现在选择、条件判断等子句中,如1.1节所述,其计算在解释执行模型中通过表达式树的递归调用实现. 但由于表达式的计算逻辑通常较为简单,这使得函数调用等成为了主要的性能开销. 编译表达式旨在通过代码生成消除这些冗余函数调用,并通过内联函数等进一步提高表达式的执行效率.
为表达式计算等进行代码生成虽然消除了运行过程中部分不必要的函数调用开销,但是并没有解决解释执行中算子间频繁的函数调用问题,所以需要进一步对算子计算进行代码生成. 现有工作采用的代码生成方式可以分为面向单算子和面向多算子2类. 前者孤立地为每个算子进行代码生成,未考虑算子间的联系;后者则打破了各算子边界,为多个关联的算子生成紧凑的执行代码.
面向单算子代码生成的HIQUE[21]通过在算子执行过程中内联物化结果来消除解释过程. 具体地,其通过类似C++模板的代码模板技术,为查询中每个算子生成特定的执行代码,随后对多个算子的代码进行整合后,便形成了整个查询最终的执行代码. 该代码在运行时避免了大部分函数调用,减少了指令以及数据的访问,提高了缓存局部性,并且能够正常调用系统的其他模块如存储引擎等. 然而HIQUE并不适用于大规模的数据查询,因为当需要处理的数据量过大时,算子的中间结果可能无法全部放置于内存中,此时需要写盘操作,引入额外的开销. 此外,HIQUE生成的代码中,各个算子是孤立的,这导致元组数据需要在各算子间传递,存在冗余的数据传递开销.
针对上述问题,Hyper[6]提出的面向多算子(又称以数据为中心)的代码生成,根据流水线切分点(pipeline breaker)将查询切分成多条包含若干算子的流水线. 随后代码生成器会以流水线为单位,为其生成紧凑的执行代码,即流水线内部多个算子的计算逻辑能够连续执行. 图7具体描述了以数据为中心的代码生成,不同序号表示不同的流水线,方框中的伪代码是该流水线对应的执行代码. 在每条流水线执行时,元组首先被加载至CPU寄存器中,只有在被流水线中所有算子逻辑处理完后才会物化至内存以供下一个流水线处理. 这种方式使得元组尽可能久地驻留在CPU寄存器中,避免了原先算子间冗余的物化操作,最大化数据局部性. 以数据为中心的查询编译技术显著提升了查询执行性能,吸引了工业界和学术界中不少系统采用该方式来实现自己的查询编译引擎. 如Spark SQL [12-13]中的全阶段代码生成(whole-stage codegen)就是将多个物理算子融合到一个单独的Java函数中;异构查询引擎DogQC[22],πQC[23]也是将多个算子逻辑封装至一个CUDA核函数内来进一步提高执行性能.
用户自定义函数(以下简称函数)作为SQL的拓展组件,通常被用来实现SQL难以表达的计算逻辑,如数据挖掘、机器学习算法等. 在不同的应用场景下,函数会借助不同语言来实现,如常见的数据分析中,函数会通过Python实现. 因此不少数据管理系统都支持Python的函数拓展,以增强SQL的表达能力,如PostgreSQL中的PL/Python等. 然而,嵌有函数的查询在执行时需要横跨函数和SQL引擎这2个分离的运行环境,进而导致2个问题:一方面,编写函数的语言的执行性能通常低于本地语言C/C++等;另一方面,查询优化器将函数视为黑盒,无法将函数与SQL进行全局优化,且缺乏对函数本身的调优. 针对这2个问题,现有工作主要通过通用编译器加速以及构建统一表示2种方式来解决.
动态语言Python性能往往不及C/C++,因而在通用编译器领域,出现了不少能够加速Python执行的编译器,如实现了即时编译成机器码的PyPy、将Python转换成C/C++的Cython等. 类似技术可以直接用来加速用户自定义函数执行,YeSQL[24]利用PyPy构建了自身的即时编译器,Kläbe等人[25]则通过Cython提高了函数的执行性能.
为了打开函数这个黑盒,不少工作通过将函数和SQL映射到统一表示上来进行全局优化. 根据表示抽象程度的不同,现有技术可以分为基于高级统一表示的优化和基于低级统一表示的优化.
一些工作通过将函数转换成关系操作等高级表示来实现全局优化. Hirn等人[26]将用户定义的PL/SQL函数翻译成普通的SQL查询,通过避免PL/SQL与SQL的上下文切换从而提升了查询性能. Froid[27]将简单函数转换成关系算子,统一了SQL与函数的运行环境. 不过这些工作底层的执行引擎仍是PostgreSQL或SQL Server等解释执行模型.
上述技术[26-27]适用范围有限且难以应用更底层的优化,因此另一些工作将SQL与函数映射到统一的低级表示上[15,28-30],从而进行更深层次的全局优化. HorsePower[31]将SQL查询和MATLAB函数编译到HorseIR[28]上,基于编译器优化技术来进行全局优化. TUPLEWARE[32]为函数生成对应的LLVM IR,通过分析LLVM IR来收集一些函数统计信息. 在代码生成阶段,优化器会利用函数的统计信息来实施针对底层硬件的底层优化. 此外,Zhang等人[33]将文献[34]中自适应处理思想拓展至自定义函数中,根据执行过程中动态变化的数据分布等,自适应地调整执行代码以提高函数本身的执行速度.
面向计划节点的代码生成主要聚焦于为每种类型的节点生成最优的执行代码,但是代码生成器需要将上述代码生成策略整合起来,并为整棵查询计划树生成一份完整的中间代码. 如何面向整棵计划树来设计一个通用的代码生成框架,是代码生成器能否具有良好拓展性的关键所在. 现有工作本质上都是通过将查询计划中的操作映射到字符串形式的中间代码上,随后通过拼接多段字符串实现的. 具体实现方式主要有2种,分别是代码模版技术以及其变体,即生产与消费(produce/consume)模型[6].
基于模板的代码生成类似于C++中的模板技术,通过将当前查询的模式信息代入到预先定义好的代码模板中,经由模板产生对应的执行代码. 因为模板的内容需要预先定义,因此该方式比较适用于语义相对固定的算子的代码生成. 采用此方式构建代码生成器的系统包括HIQUE,Hekaton[35]等,但这种方式实现的代码生成器通用性不佳,难以拓展.
为了提高代码生成器的通用性、降低其复杂度,Neumann提出生产/消费模型. 该模型采用类似解释执行下迭代器的结构,每个算子都需要实现生产和消费2个函数. 其中,生产函数负责逻辑控制,消费函数负责输出算子运算逻辑对应的字符串形式,代码生成器通过往返遍历输入的物理执行计划来完成代码生成工作. 具体过程如图8所示,首先根节点会逐层向下调用子节点的生产函数,当遇到哈希表构建等流水线切分点时,会切断当前流水线并产生一条新流水线. 切分完成后会继续向下调用生产函数,直至传递到叶子节点,此过程会将查询计划树切分成若干流水线. 其次,叶子节点会逐层向上调用父节点的消费函数直至当前流水线的根节点,此过程则会为每一个流水线生成其对应的代码. 最后,将这些代码片段组合后就形成了整个查询的完整执行代码. 由于该方式是以流水线为单位进行代码生成,因而产出的执行代码更为紧凑,即一个元组上能连续执行的操作均被封装在1个代码块中,执行时也更为高效. 该模型属于模板技术的变体,针对的是以数据为中心的代码生成. 除Hyper外,Spark SQL,LingoDB[30],Grizzly[36]等系统也采用这种模型来构建自己的代码生成器. 上述生产/消费模型将代码生成工作分散到生产和消费这2类函数中,在开发新算子时,需要对算子计算逻辑进行拆解,然后将各部分用这2类函数来实现,不利于代码生成器的拓展. 因而Tahboub等人[8]基于Scala的特性和编译器拓展,采用第一二村映射(the first Futamura projection)的思想实现了一个类型安全、可读性高、架构清晰的查询编译器. Tahboub等人[8]首先构建了一个以数据为中心的解释器,并通过回调函数来实现算子间的通信,随后通过特化该解释器便能够得到代码生成器. 这种方式将代码生成工作集中在一个函数中,因此在增加新算子时,只需要实现1个函数即可,而且该方式也使得整个查询编译器能够同火山模型一样具有清晰的结构.
代码模板技术和生产/消费模型是构建代码生成器的常用框架,面向的是整个执行计划,并不是仅针对表达式、算子或是用户自定义函数中的某一种. 不同系统可以组合其中二者来使用,比如算子的代码生成通过生产/消费模型实现,内部表达式的代码生成则可以通过代码模板来实现. 用户自定义函数通常是由高级语言编写的,一般可以直接或间接(如通过通用编译器编译出中间代码后)地与其余中间代码进行拼接. 虽然自定义函数并没有按照上述2种模板方式来实现,但是从整个查询的角度来看,自定义函数的代码生成过程也属于基于模板或生产/消费模型的代码生成中的一个环节.
诸如Impala,HIQUE,Hyper等系统关于如何构建一个高效且通用的代码生成器展开了深入研究,从最初仅针对简单表达式直到随后面向多个算子生成紧凑的执行代码,一步步实现了更高的系统吞吐. 在保证代码生成器的通用性方面,类似解释执行中迭代器结构的生产/消费模型也在逐步成为构建生成器时的参考标准. 值得注意的是,给系统实现代码生成技术时,是采用表达式等简单对象还是算子上的代码生成取决于性能收益和系统入侵程度的取舍. 元组变形和表达式计算过程较为简单,因此对这2类对象进行代码生成,实现上较为容易,对于整个系统的入侵以及改动也相对较小. 关系算子是数据管理系统中的核心对象,对其进行代码生成相当于重新构建基于查询编译的执行引擎,且算子级别的代码生成工作通常也实现了数据格式与表达式的代码生成,因而开发复杂度较高. 因此对于一些基于解释执行的数据管理系统来说,可通过实现元组变形和表达式计算的代码生成来加速查询执行. 此外,现有工作主要考虑的是一棵计划树上的代码生成,在多查询优化[37]问题下,系统同时要对多条查询进行优化,查询编译能否为该问题带来新的优化机会值得探究.
中间表示是整个查询编译器的核心模块,其作为代码生成器输出的中间代码的载体,需要准确高效地表达出查询内容;作为运行时的输入,要能够被快速地编译成机器码. 中间表示的设计需要从2个方面入手,包括中间表示的描述语言和中间表示的层级.
一般情况下代码生成器不会直接生成可读性较低的低层指令(汇编、机器指令),而是生成某种中间表示作为与低层指令之间的桥梁. 如图9所示,该中间表示可通过低级语言、高级语言等多种语言来描述,因此首先要确定中间表示的描述语言. 在确定好合适的语言后,若要提高中间表示的表达能力,需要考虑是否采用多层架构,但该架构会增大编译延迟,因而应当根据系统需求进行选择. 本节首先介绍了不同语言的特点以及基于该语言构建中间表示的研究工作,随后深入分析了多级中间表示的相关工作.
在编译器领域中,已有的语言通常在设计之初就已经综合考虑了延迟与表达能力,因此现有系统会结合自身上下文直接选择已有的语言作为中间表示. 现有工作采用的语言主要包括3类:高级语言、低级语言以及自定义语言. 其中,高级语言包括C++,CUDA等相对机器码而言抽象级别较高的通用程序语言;低级语言指抽象级别较低的通用表示或指令,如LLVM IR、汇编等. 其中低级语言的编译延迟较低,但表达能力不佳,不利于代码生成. 因此,部分工作通过构建自定义语言来提高表达能力,同时进一步降低了编译延迟. 以查询中的加法表达式为例,图10展示了3种不同语言下的中间表示.
高级语言可读性更高,并且有社区不断维护与优化,因此大部分系统选择高级语言作为中间表示. 不同系统根据自身所处的上下文,会选择不同的高级语言,包括:1)原生语言如C++,CUDA等;2)托管语言如Java,C#等; 3)混合语言.
1)原生语言
原生语言也可称为本地语言,指代码执行前需要被编译成本地机器码,执行速度快但无法跨平台,包括C/C++等. C/C++凭借自身的高效性和可移植性等特点被不少系统选用. 诸如HIQUE,Hekaton,Amazon Redshift[38]等均生成SQL对应的C/C++代码,然后调用GCC或Clang编译成可执行文件. Hyper最初的设计也是直接生成C++代码,但考虑到C++ 的编译器将C++编译成机器码时速度不佳、无法完全控制生成的代码、溢出标志不可用等因素,最终放弃了完全使用C++[6],转而使用LLVM IR作为目标代码.
2)托管语言
托管语言在执行前不需要被编译成机器码,而是直接交由虚拟机解释执行,执行速度相较于原生语言较慢,但支持跨平台. 查询编译器在为中间表示选择语言时,除了考虑性能因素外,还需要兼顾数据管理系统本身所处的上下文. Spark SQL底层执行引擎基于Scala实现,Scala本身是交由JVM托管的,因此为查询生成Java或JVM字节码可以更高效地调用系统其他模块. 值得注意的是,JVM字节码的语义与Java的语法结构等有较为直接的对应关系,抽象级别较高,因此也归为高级语言的范畴. 同时JVM提供的反射机制、即时编译等也有利于查询代码的高效调用和执行,因此内存数据库系统原型JAMDB[39]也基于Java来构建.
3)混合语言
部分工作会选择生成原生与托管语言混合的执行代码. LINQ[40]查询将SQL语法集成到C#语言中,使得用户可以在C#语言中直接查询和操作各种数据. Nagel等人[41]通过代码生成的方式以提高LINQ查询处理的效率,生成的代码同时包含了C#和C. 其中C#用于对数据进行“分层”,C则用来加速计算. 之所以不将所有逻辑都交由C处理主要有2个原因:一是因为C可能无法访问部分C#数据;二是对于一些简单查询如选择-投影而言,将数据交由C处理所需做的转换代价超过了用C计算带来的收益.
相对高级语言而言,低级语言更加靠近机器语言、可读性较低、增加了代码生成器的开发复杂度等. 但直接生成低级语言表示的执行代码,可以避免高级语言方式下存在的编译器前端开销,这2种语言在具体编译流程中的区别如图11所示. 低级语言具体包括通用中间表示以及汇编.
通用中间表示指通用编译器的中间表示,如LLVM IR,WebAssembly[42](简称Wasm)等. LLVM IR类似于汇编语言,由一些简单指令组成. 为查询生成对应的LLVM IR,可以利用LLVM优化器对IR进行优化并降级至机器码. LLVM框架也提供了一些能够提高开发效率的模块,如辅助生成IR的IRBuilder[43]等. 相较于C++等高级语言,更低级的LLVM IR能提供更快的机器码生成速度. 以TPC-H查询为例,LLVM IR代码的机器码生成速度比C++代码的机器码生成速度快了2个数量级左右[6]. 诸如Impala,SingleStore[14],TUPLEWARE等系统也都选用LLVM IR作为自己查询编译器的中间表示. Wasm是一种基于堆栈虚拟机的二进制指令格式,诞生于Web领域,凭借紧凑、独立于硬件、执行时接近本地执行速度等特点,受到了Web外其他领域的关注. Haffner等人[44]为查询计划生成Wasm格式的中间代码,并将其交由V8引擎[45]执行.
查询编译思想的出现最早可以追溯至System R,System R直接为SQL生成对应的汇编代码[5]. 由于生成汇编码步骤复杂,且缺乏先进的编译器技术,所以System R整体性能不佳. 此外,因为生成的是汇编码,所以需要为不同的操作系统或硬件平台实现不同的查询编译器,这削减了编译器的移植性和可维护性. 因此,IBM研发DB2时便放弃了该技术.
低级语言虽然避免了编译前端的开销,但表达能力不佳. 具体而言,通过低级语言来描述数据库的特定语义操作时更为复杂,当中间表示由多种语言组成时,难以进行多语言的协同优化. 此外,低级语言被编译成机器码的过程中仍存在延迟. 因此,一些工作通过设计并实现自定义语言来解决上述问题. 从抽象层次角度来看,自定义语言更加靠近低级语言如LLVM IR. 具体可以分为基于独立编译栈的自定义语言和基于开源编译器框架的自定义语言.
部分工作通过独立地实现一套编译器框架,包括中间表示和编译后端等,从而提高了中间表示的表达能力. Weld通过统一的中间表示Weld IR,实现了多系统间的深度优化,避免了冗余的数据传输等. Umbra[16]针对数据库领域设计并实现了中间表示Umbra IR,包括特定的数据结构以及指令等. Umbra IR在设计过程中能够实现高度的灵活性,在提高表达能力的同时也降低了编译延迟. 此外,SQLite[46]虽然生成的是也自己定义的字节码,但这些字节码本质上还是交给由C编写的虚拟数据库引擎(virtual database engine,VDBE)去解释执行.
另一些工作通过利用编译器领域的技术框架来构建统一的中间表示,以此实现协同优化. LingoDB借助多层中间表示(multi-level intermediate representation,MLIR)框架[47],利用MLIR提供的方言实现了自己的中间表示,可支持数据处理和线性回归等模型的协同优化.
表1从编译速度、执行速度以及复杂度对比了不同中间表示下的代表性语言,其中编译速度指生成机器码的速度,复杂度综合考量了表达能力、实现成本等. 表达能力越低,实现成本越高,则该语言的复杂度越高. 值得注意的是,以下对比针对x86架构,且原生语言C以及LLVM IR均开启编译优化.
编译速度层面,LLVM IR等中间表示避免了C等原生语言存在的编译前端开销,因而机器码生成得更快. 自定义语言由于构建了特定编译栈,具有更简洁的编译流程,因而编译速度最快. Java的编译通常是指编译成字节码,故不考虑Java的编译速度.
执行速度层面,Java等托管语言交由虚拟机解释执行,即使开启Java的即时编译优化,执行速度也不及原生语言和LLVM IR. C和LLVM IR所处的抽象级别不同,但均采用LLVM框架编译与优化,生成的机器码质量差别不大,因而都具有高效的执行速度. 自定义语言由于精简了编译流程,减少了通用编译器中的优化环节,因而执行速度不及原生语言C和LLVM IR.
复杂度层面,中间表示的表达能力越强越有利于代码生成,且高级语言C的机器码生成完全交由通用编译器完成,因此通常具有较低的复杂度. LLVM IR等表达能力更低,大多中间表示以静态单一赋值(static single assignment,SSA)形式给出,并且与编译器框架的交互更复杂[48],这些都增加了代码生成的复杂性. 自定义语言虽然表达能力强,但需要设计并实现特定的中间表示以及针对不同架构的编译后端等,需要对编译器结构、机器架构等有深入了解,因而复杂度最高.
初期以Hyper为代表的查询编译器主要采用单层架构,表达能力不佳且难以维护. 部分工作提出在可接受的编译延迟范围内,通过多级架构的中间表示来解决上述问题.
基于单层架构所构建的查询编译器直接将查询计划翻译成某种中间表示如C++,该中间表示随后经GCC等编译器编译后生成可执行文件. 在此架构下,流水线划分、算法实现、数据结构定义(如哈希表、列表)等逻辑模块全部封装在一层中实现. 这种耦合方式违背了软件设计的原则,导致系统可维护性、可拓展性以及灵活性等受限;而且多种模块之间可能会产生组合爆炸的问题,导致代码库代码爆炸[49].
Klonatos等人[7]指出基于单层架构所构建的查询编译器难以实现且错失了优化机会,存在灵活性差、难以维护等缺陷. 因此Shaikhha等人[49]提出使用多级中间表示架构来构建查询编译器,通过将原先单层中间表示处理内容解耦到多级中间表示上,以此解决上述问题. 采用多级架构的DBLAB/LB按照类似图12的模式构建,IR1至IRN的抽象级别由高到低,各IR负责不同的转换工作,如哈希表特化、列表特化等. DBLAB/LB首先将查询计划翻译为声明式的高级IR1,然后将此IR1逐级降级到更低级的IR2,直至翻译成最底层的IRN. 这种多层抽象与逐级优化的模式提高了查询编译器的优化能力,降低了整体的复杂性,也影响了随后其他数据管理系统查询编译器的开发,如LingoDB,Umbra等. 多级中间表示中通常需要实现自定义的高层中间表示,该中间表示的抽象层次一般高于C/C++等高级语言,如Excalibur[50]中的VOILA[51]、Hekaton中的MAT等. 这类语言更贴近SQL层,因而便于进行高层次的优化. 代码生成时,这类语言作为和C/C++之间的中间层,也增加了代码生成的灵活性.
虽然多层架构避免了单层架构的局限性,但要求研发人员必须花费精力去实现多种中间表示和对应的降级逻辑,且多层降级过程也增大了代码生成延迟. Jungmair等人[30]也指出开发采用多级架构编译器往往需要投入大量人力去实现一些重复的模块,如类型转换、与低级编译器框架的交互等. 这一方面造成了资源的浪费;另一方面,不同系统的查询编译器之间的隔离性导致很难将其中一个的技术在另一个编译器中应用或验证. 因此,Jungmair等人[30]提出基于MLIR框架来构建查询编译器. 开源的MLIR提供了统一的中间表示框架,通过方言[52]可以在同一中间表示框架上构建出不同抽象层次的中间表示(如高级的执行图、低级的汇编指令等),这与查询编译器的多层架构非常匹配. 此外,MLIR提供的跨领域优化能力也有利于深层次地优化嵌有机器学习负载的SQL查询. 基于MLIR,LingoDB还将查询优化融合到代码生成阶段,为查询优化提供了新的可能性.
Tahboub等人[8]则指出基于多级中间表示架构构建查询编译器增加了不必要的复杂性,于是通过重构生产/消费模型实现了架构清晰的查询编译器. 这种方式虽然降低了查询编译器整体的复杂性,但由于需要较长的代码生成时间,也增加了查询延迟.
如3.1~3.2节所述,不同系统在构建自己的中间表示时,应当根据自身所处的上下文来选择合适的语言,不过结合已有研究工作和工业界系统来看,LLVM IR通常更受欢迎. 此外,从最开始的单层架构到如今的多级架构,围绕着如何设计一个合理且高效的中间表示架构的探讨不断推动着查询编译器的发展. 这些工作影响了后续查询编译器的设计,Kersten等人[16]在研发Umbra时便借鉴了多层架构思想以及Tahboub等人[8]所提出的新颖方案. 不过至今为止,关于如何构建查询编译器仍然没有一个统一的方案. 然而,现有工作主要关注如何降低编译延迟或提高表达能力,但同时也应当注意相应技术是否会给技术落地带来难度,因为较低的系统复杂度、实现成本等在工业系统中通常比高性能更为重要. 因此,如何针对工业界需求去设计更合理的中间表示实现方式应当受到更多关注.
如3.1节所述,不少系统都会采用执行效率高的原生语言或LLVM IR作为自身的中间表示,因此如图13所示,在得到这类语言所表示的中间代码后,系统需要借助通用编译器将其编译成机器码并交由运行时运行才能得到最终的查询结果. 在机器码生成环节存在的关键问题是,针对运行时间短的查询,如何降低机器码生成开销;在机器码运行环节存在的关键问题是,如何进一步提高机器码运行时的性能. 本节将针对上述2个问题对相关工作展开介绍.
通过代码生成器得到的C/C++等所表示的中间代码并不能直接运行,首先需要被GCC,Clang等通用编译器编译成可执行文件. 这段编译时间通常为毫秒级至秒级,以Hyper执行TPC-H1为例,将中间代码通过编译器编译成可由机器执行的机器码耗时高达49 ms. 这段开销对于运行时间较长的查询而言可以忽略不计,但对于运行时间短但生成的代码却复杂的查询而言,编译所需时间甚至会远超查询执行时间[53],导致机器码生成这一过程成为性能瓶颈. 在极端情况下,编译执行的总体性能甚至还不如传统火山模型. 不同于普通程序的C/C++或LLVM IR代码,生成的中间代码表达的是查询的执行逻辑,因而有2个特性:一是可能与其他查询的中间代码相同或具有相似的部分;二是具有SQL特有的语义. 现有工作分别利用这2个特性对上述问题进行了优化,包括代码缓存、混合执行和编译器化简.
1)代码缓存. Redshift构建了编译服务,当需要编译的代码过多时,编译服务会将编译任务卸载到远程的计算资源上来加速编译过程. 对于相同或相似的查询,可以进一步重用已经编译好的部分,编译服务便通过缓存和复用执行过的查询代码来避免重复编译,进而降低编译开销[38].
2)混合执行. Kohn等人[53]通过混合解释执行与编译执行来降低Hyper中的编译开销,并尽可能地最大化吞吐. 解释执行指的是将中间代码LLVM IR通过解释器来解释执行,比如LLVM内置的解释器可以直接解释LLVM IR模块,从而避免编译带来的延迟. 但由于内置解释器的执行性能太低,Kohn等人[53]开发了字节码虚拟机,系统将LLVM IR翻译成高效的字节码后,通过虚拟机对该字节码解释执行,以此来提升解释执行性能. 然而对于一个通用编程语言实现上述虚拟机等技术并非易事,不过由于中间代码表达的是SQL的执行逻辑,代码中涉及的主要是SQL语义以内的指令,因此实现相应技术时只需考虑此类指令便可简化技术实现. 优化后的解释执行虽然避免了编译延迟,但其性能仍然不及编译后的机器码性能,无法满足系统的高吞吐需求,因此Kohn等人[53]提出了混合执行. 具体的,Hyper接收到查询后,首先生成查询对应的中间代码即LLVM IR,随后将中间代码转换为字节码并交给虚拟机解释执行. 在解释执行过程中,系统会根据运行时的监控信息来判断是否需要切换到编译执行. 如果采用编译执行带来的性能收益高于引入的编译开销,便自动进行切换. 因为2种执行方式执行的是完全相同的代码,因而很容易做到无缝切换. Menon等人[54]在自己的内存数据库中也采用了类似的混合执行策略,自适应地切换执行方式以兼顾查询处理的低延迟与高吞吐.
3)编译器化简. 通过精简通用编译器的冗余编译操作来提高编译速度. Kersten等人[16]、Funke等人[55]认为通用编译器包含复杂的代码分析等过程,这些对于编译结构简单的SQL代码来说是不必要的. 因此,他们针对关系查询设计并实现了定制的编译栈,其包括中间表示和编译后端等,避免了原先编译过程中一些不必要的操作. 举例来说,Umbra通过编译后端Flying Start直接将Umbra IR翻译成x86_64机器码,在1~2 ms内便能够完成TPC-H查询的编译. 随后Umbra面向AArch64架构也构建了低延迟编译后端FireARM[48]. ReSQL[55]也通过实现Flounder IR达到了低延迟的查询编译.
编译得到的可执行文件的性能相较于原先采用“一次一元组”解释执行,虽然有了显著提升,但如果运行时的数据分布与查询优化器估计的不一致,会导致执行效率降低. 此外,代码生成器生成的代码大多面向的是CPU,如果在GPU上运行相同的代码逻辑,可能会出现Warp分歧现象,降低执行效率. 针对上述问题,现有工作在代码运行过程中,分别利用自适应等通用优化技术和特定优化技术予以解决.
1)通用优化. Menon等人[54]将自适应查询处理应用到了查询编译中,在执行时动态调整谓词顺序、连接顺序等来加速代码执行,并且通过分解和结构化过滤操作等方法来避免重新编译查询. Haffner等人[44]指出V8引擎自身就支持上述混合执行和自适应优化等,因此基于V8实现了查询引擎mutable,并将上述执行技术全部委托给V8处理. 具体地,mutable首先为查询计划生成基于Wasm的中间代码,随后将该代码交由V8的Liftoff进行快速编译与执行. V8在执过程中会逐渐切换到TurboFan产生的优化代码上来执行. 其中,Liftoff提供了类似Umbra中Flying Start的功能,TurboFan则类似LLVM这一优化编译器.
2)特定优化. 以数据为中心的代码生成会将多个算子执行逻辑封装在1个函数中,使得生成的代码紧凑且高效,但是这种方式也会导致函数有时会包含相对复杂的分支判断等逻辑. 在GPU中执行这类函数时,可能会加剧Warp分歧现象,DogQC[22]通过下推式并行和填充机制优化了该问题.
如何降低查询编译所引人的编译开销,Kersten等人[16]、Kohn等人[53]给出了精简通用编译器、混合解释执行与编译执行等解决思路. 此外,Menon等人[54]的研究工作则针对运行时存在的问题进行了优化,进一步提高了系统吞吐. 机器码的生成与运行和底层硬件息息相关,随着底层硬件的产业变革,FireARM等工作开始研究ARM架构之上的机器码生成. 相同的变革不仅改变着数据管理系统领域,同样影响着深度学习领域的技术演进,如支持不同体系架构的深度学习编译器TVM[56]. 因此研究者在探索新硬件或ARM架构之上的查询编译器时,应当积极借鉴或复用其他领域的已有技术,一方面能够加速查询编译领域的发展,另一方面也有利于未来不同领域系统间的融合.
查询编译给查询处理带来的性能提升催生了一众基于查询编译的数据管理系统,包括工业系统Spark SQL,SingleStore以及学术领域中的LegoBase,Umbra等. 不同系统在代码生成器框架、中间表示的语言以及所采取的优化技术的选择上各有不同,因而在性能和功能等维度上有显著差异. 在表2中,本文结合近期工作[48],从延迟、吞吐、表达能力等指标上综合比对了相关系统. 其中选取的系统主要采用以数据为中心的代码生成(参见2.1.2节),因为该策略性能提升最为显著,被主流基于查询编译的系统采用.
1)延迟与吞吐. 延迟与吞吐均是系统的性能指标. 延迟指对查询进行代码生成和机器码生成所需的编译时间,对于交易场景而言是主要的评价指标,延迟越低表明系统可以越快地响应前端请求. 吞吐指系统每秒所能处理的元组数量,吞吐大小与生成的代码质量密切相关. 对于计算密集型负载而言,吞吐越大表明系统能够完成作业的速度越快. 在基于查询编译的数据管理系统中,延迟与吞吐有时会相互制约:比如减少编译器优化步骤可以降低编译延迟,然而这会导致产生的代码质量变低,从而使得吞吐减小. 但系统可以通过采用第4节所述的优化手段来提高自身吞吐.
2)表达能力. 表达能力用来评估在系统的中间表示上能否高效便捷地表达算法细节,如算子语义、内存交互等. 良好的表达能力对于生成高质量查询代码至关重要,同时也有利于降低代码生成的复杂性.
3)移植能力. 移植能力用来评估将基于查询编译的系统移植到不同硬件或架构之上时,对硬件或架构特有属性如内存模型、特有指令等的应对能力. GPU,FPGA等新硬件以及ARM架构的兴起给数据管理系统带来了新的变革,而它们通常具有不同特性,因此良好的移植能力对系统而言也是必不可少的.
4)是否开源. 不同系统所采用的查询编译执行模型在诸多模块上都有着相同之处,比如代码生成器框架、与运行时的交互模块等. 系统开源能够减少重复开发上述模块所消耗的人力、物力成本,也有利于各类创新想法的验证与融合,更有助于查询编译的创新与发展.
在传统关系型数据管理系统中,各类优化工作使得查询编译技术愈来愈成熟与完善. 但与此同时,分析型负载变得越来越复杂多样,新型编译技术层出不穷,新硬件和云计算也逐渐演变成了数据管理系统中的基础组件. 这些变革给查询编译带来新机遇的同时也提出了新的挑战. 本节将从1.2节的研究挑战出发,结合查询编译领域当前的前沿工作,从代码生成、中间表示和机器码生成与运行3个层面来展望该技术未来可能的发展趋势,具体可细分为4个方向:
1)应对复杂分析负载的高吞吐与低延迟需求. 在代码生成层面,需要考虑上层新型负载对构建代码生成器提出的新需求. 如今的数据分析任务变得越来越复杂,仅仅通过原生的SQL查询已经无法满足这类负载. 以数据探索分析为例,一个分析工作往往需要多个库或多个系统来协同合作. 包括从数据管理系统中检索出所需数据,随后交由数据清洗、特征提取等库进行处理,最后输入至机器学习模型进行训练或推理. 上述多个库或系统互为黑盒,这导致整个分析任务中存在不必要的数据传输与冗余计算,进而造成整个分析查询吞吐低或延迟高. 近些年来一些研究工作聚焦于通过查询编译来解决上述问题,通过将不同系统的执行计划映射到统一的中间表示上以实现跨系统的协同优化[15,30,57],并通过代码生成产生高效的执行代码. 而跨系统的分析任务多种多样,仍存在不少优化空间,需要进一步地深入研究. 此外,通过查询编译技术来加速其他引擎也是一个新生方向,如流计算[36]、图计算引擎等.
2)融合新型编译技术提升查询编译的综合能力. 如3.3节所述,如何构建查询编译器或中间表示仍没有一个统一的方案,因此在中间表示层面可以通过借鉴或利用编译器领域的新技术来进一步探索. 查询编译与编译器领域密切相关,不少核心思想或技术都来源于该领域,如多级中间表示、LLVM IR等. 编译器领域中相关技术不断推陈出新,其中一些技术依然可以被查询编译所采用. 诸如通过编译器基础设施MLIR来构建统一的多层中间表示,利用新型字节码格式Wasm来加速机器码生成等. 新型编译技术层出不穷,如何合理且有效地整合这些新型编译技术值得进一步挖掘. 此外,查询编译的特性增加了系统开发和性能分析难度[58],这也使得相关厂商在开发系统时,不得不放弃使用查询编译. 如何针对查询编译构建高效的代码调试等工具,从而提高开发效率[59]并完善功能特性也是一个前沿研究方向.
3)面向新硬件和云计算的高效代码生成. 在机器码生成与运行层面,应当关注如何根据不同硬件特性来设计高效的代码生成策略,充分考虑异构计算下的诸如存储层级和数据传输等,从而进一步提高机器码运行时的性能. GPU等硬件加速器为数据处理带来了巨大的潜力,越来越多的工作面向新硬件采用代码生成技术进一步提高了异构计算性能[22-23,60]. 然而,这类新硬件与CPU相比从编程语言到底层架构都存在不小的差异. 此外,无服务器计算的出现也给查询编译带来了新的可能,例如通过无服务器计算提升机器码生成速度[61]等. 随着数据管理系统不断云化,如何面向云场景设计更合理的查询编译策略也值得深入研究.
4)针对不同体系架构的查询编译范式. 在机器码生成与运行层面,还应当考虑如何面向RISC架构扩展现有的查询编译执行模型. 随着摩尔定律逐步放缓,硬件市场的格局也已经发生了变化. 基于复杂指令集的x86已不再是主导市场的核心架构,不少厂商逐步投入到采用精简指令集架构的ARM或RISC-V. 与此同时,近期一些工作也指出基于ARM的数据管理系统性能会超过基于x86的,这可能结束x86架构在数据管理系统中的主导地位[48,62]. 因此,一些前沿工作开始设计支持不同架构和硬件的领域特定中间表示[50-51],从而使得基于查询编译的系统在新架构下也能兼具较低的编译延迟和高吞吐. 此外,智能手机等终端设备的持续普及以及嵌入式数据库的发展也会加速上述变革,如何适应体系架构的转变并设计新型查询编译范式是未来值得关注的发展方向.
查询编译为查询生成紧凑高效的定制化代码,能够显著提升查询处理性能. 越来越多的系统通过查询编译技术提升查询执行性能,有的是即时编译简单表达式,有的则是针对算子或整个查询进行编译. 在加速查询执行方面,查询编译器正在逐渐成为数据管理系统不可或缺的组件. 本文首先概述了查询编译的基本概念,随后从代码生成、中间表示、机器码生成与运行3个角度对查询编译现有工作进行了总结分析. 如今,新型硬件加速器和编译器技术等给查询编译带来机遇的同时也引入了新的挑战,本文最后总结了该领域的前沿研究方向,同时展望了查询编译未来可能的发展方向. 总之,在提升查询编译性能的同时降低其技术复杂度仍然任重道远.
作者贡献声明:潘青峰完成了论文撰写;徐辰提出指导意见并修改论文.

参考文献 引证文献
排序方式:
1
Kersten T, Leis V, Kemper A, et al. Everything you always wanted to know about compiled and vectorized queries but were afraid to ask[J]. Proceedings of the VLDB Endowment, 2018, 11(13): 2209−2222
2
Boncz P A, Zukowski M, Nes N. MonetDB/X100: Hyper-pipelining query execution[C/OL]//Proc of the 2nd Conf on Innovative Data Systems Research (CIDR). 2005 [2023-11-28].https://www.cidrdb.org/cidr2005/papers/P19.pdf
3
Raposa R, Roscigno D, Bragin T, et al. Distinctive features of ClickHouse [EB/OL]. [2023-06-13].https://clickhouse.com/docs/en/about-us/distinctive-features#vector-engine
4
Garcia-Molina H, Ullman J D, Widom J. Database System Implementation Second Edition[M]. Upper Saddle River: Prentice Hall, 2010: 759−760
5
Chamberlin D D, Astrahan M M, Blasgen M W, et al. A history and evaluation of System R[J]. Communications of the ACM, 1981, 24(10): 632−646
6
Neumann T. Efficiently compiling efficient query plans for modern hardware[J]. Proceedings of the VLDB Endowment, 2011, 4(9): 539−550
7
Klonatos Y, Koch C, Rompf T, et al. Building efficient query engines in a high-level language[J]. Proceedings of the VLDB Endowment, 2014, 7(10): 853−864
8
Tahboub R Y, Essertel G M, Rompf T. How to architect a query compiler, revisited[C]//Proc of the 2018 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2018: 307−322
9
PostgreSQL Community. What is JIT compilation [EB/OL]. [2023-08-17].https://www.postgresql.org/docs/current/jit-reason.html
10
OceanBase Community. ob_enable_jit [EB/OL]. [2023-08-17].https://en.oceanbase.com/docs/common-oceanbase-database-10000000000931187
11
openGauss Community. Other optimizer options [EB/OL]. [2023-08-17].https://docs.opengauss.org/en/docs/1.0.0/docs/Developerguide/other-optimizer-options.html
12
Armbrust M, Xin R S, Lian Cheng, et al. Spark SQL: Relational data processing in Spark[C]//Proc of the 2015 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2015: 1383−1394
13
Agarwal S, Liu D, Xin R. Apache Spark as a compiler: Joining a billion rows per second on a laptop[EB/OL]. [2023-06-13].https://databricks.com/blog/2016/05/23/apache-spark-as-a-compiler-joining-a-billion-rows-per-second-on-a-laptop.html
14
Prout A, Wang S P, Victor J, et al. Cloud-native transactions and analytics in SingleStore[C]//Proc of the 2022 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2022: 2340−2352
15
Palkar S, Thomas J, Narayanan D, et al. Evaluating end-to-end optimization for data analytics applications in Weld[J]. Proceedings of the VLDB Endowment, 2018, 11(9): 1002−1015
16
Kersten T, Leis V, Neumann T. Tidy tuples and flying start: Fast compilation and fast execution of relational queries in Umbra[J]. The VLDB Journal, 2021, 30(5): 883−905
17
Neumann T. Evolution of a compiling query engine[J]. Proceedings of the VLDB Endowment, 2021, 14(12): 3207−3210
18
Viglas S D. Just-in-time compilation for SQL query processing[C]//Proc of the 30th IEEE Int Conf on Data Engineering (ICDE). Piscataway, NJ: IEEE, 2014: 1298−1301
19
Melnik D, Buchatskiy R, Zhuykov R, et al. JIT-compiling SQL queries in PostgreSQL using LLVM [EB/OL]. [2023-06-13].https://www.pgcon.org/2017/schedule/events/1092.en.html
20
Kornacker M, Behm A, Bittorf V, et al. Impala: A modern, open-source SQL engine for Hadoop[C/OL]//Proc of the 7th Conf on Innovative Data Systems Research (CIDR). 2015[2023-11-28].https://www.cidrdb.org/cidr2015/Papers/CIDR15_Paper28.pdf
21
Krikellas K, Viglas S D, Cintra M. Generating code for holistic query evaluation[C]//Proc of the 26th IEEE Int Conf on Data Engineering (ICDE). Piscataway, NJ: IEEE, 2010: 613−624
22
Funke H, Teubner J. Data-parallel query processing on non-uniform data[J]. Proceedings of the VLDB Endowment, 2020, 13(6): 884−897
23
Yang Zhenhua, Pan Qingfeng, Xu Chen. Fine-grained tuple transfer for pipelined query execution on CPU-GPU coprocessor[C]//Proc of the 28th Int Conf on Database Systems for Advanced Applications (DASFAA). Berlin: Springer, 2023: 19−34
24
Foufoulas Y, Simitsis A, Stamatogiannakis L, et al. YeSQL: “You extend SQL” with rich and highly performant user-defined functions in relational databases[J]. Proceedings of the VLDB Endowment, 2022, 15(10): 2270−2283
25
Kläbe S, DeSantis R, Hagedorn S, et al. Accelerating Python UDFs in vectorized query execution[C/OL]//Proc of the 12th Conf on Innovative Data Systems Research (CIDR). 2022 [2023-09-19].https://www.cidrdb.org/cidr2022/papers/p33-klaebe.pdf
26
Hirn D, Grust T. PL/SQL without the PL[C]//Proc of the 2020 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2020: 2677−2680
27
Ramachandra K, Park K, Emani K V, et al. Froid: Optimization of imperative programs in a relational database[J]. Proceedings of the VLDB Endowment, 2017, 11(4): 432−444
28
Chen Hanfeng, D'silva J V, Chen Hongji, et al. HorseIR: Bringing array programming languages together with database query processing[C]//Proc of the 14th ACM SIGPLAN Int Symp on Dynamic Languages. New York: ACM, 2018: 37−49
29
Sichert M, Neumann T. User-defined operators: Efficiently integrating custom algorithms into modern databases[J]. Proceedings of the VLDB Endowment, 2022, 15(5): 1119−1131
30
Jungmair M, Kohn A, Giceva J. Designing an open framework for query optimization and compilation[J]. Proceedings of the VLDB Endowment, 2022, 15(11): 2389−2401
31
Chen Hanfeng, D'silva J V, Hendren L, et al. HorsePower: Accelerating database queries for advanced data analytics[C]//Proc of the 24th Int Conf on Extending Database Technology (EDBT). Berlin: Springer, 2021: 361−366
32
Crotty A, Galakatos A, Dursun K, et al. An architecture for compiling UDF-centric workflows[J]. Proceedings of the VLDB Endowment, 2015, 8(12): 1466−1477
33
Zhang Wangda, Kim J, Ross K A, et al. Adaptive code generation for data-intensive analytics[J]. Proceedings of the VLDB Endowment, 2021, 14(6): 929−942
34
Răducanu B, Boncz P, Zukowski M. Micro adaptivity in vectorwise[C]//Proc of the 2013 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2013: 1231−1242
35
Freedman C, Ismert E, Larson P Å. Compilation in the Microsoft SQL Server Hekaton engine[J]. Bulletin of the IEEE Computer Society Technical Committee on Data Engineering, 2014, 37(1): 22−30
36
Grulich P M, Sebastian B, Zeuch S, et al. Grizzly: Efficient stream processing through adaptive query compilation[C]//Proc of the 2020 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2020: 2487−2503
37
Sellis T K. Multiple-query optimization[J]. ACM Transactions on Database Systems, 1988, 13(1): 23−52
38
Armenatzoglou N, Basu S, Bhanoori N, et al. Amazon Redshift re-invented[C]//Proc of the 2022 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2022: 2205−2217
39
Rao J, Pirahesh H, Mohan C, et al. Compiled query execution engine using JVM[C]//Proc of the 22nd IEEE Int Conf on Data Engineering (ICDE). Piscataway, NJ: IEEE, 2006: 23−34
40
Meijer E, Beckman B, Bierman G. LINQ: Reconciling object, relations and XML in the .NET framework[C]//Proc of the 2006 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2006: 706−706
41
Nagel F, Bierman G, Viglas S D. Code generation for efficient query processing in managed runtimes[J]. Proceedings of the VLDB Endowment, 2014, 7(12): 1095−1106
42
Haas A, Rossberg A, Schuff D L, et al. Bringing the web up to speed with WebAssembly[C]//Proc of the 38th ACM SIGPLAN Conf on Programming Language Design and Implementation. New York: ACM, 2017: 185−200
43
LLVM Community. Class template reference [EB/OL]. [2023-06-13]. http://llvm.org/docs/doxygen/html/classllvm_1_1IRBuilder.html
44
Haffner I, Dittrich J. A simplified architecture for fast, adaptive compilation and execution of SQL queries[C]//Proc of the 26th Int Conf on Extending Database Technology (EDBT). Berlin: Springer, 2023: 1−13
45
Bynens M, Steiner T, Sharma U, et al. What is V8 [EB/OL]. [2023-06-13].https://v8.dev
46
SQLite Consortium. The SQLite bytecode engine [EB/OL]. [2023-06-13].https://www.sqlite.org/opcode.html
47
Lattner C, Amini M, Bondhugula U, et al. MLIR: Scaling compiler infrastructure for domain specific computation[C]//Proc of the 19th Int Symp on Code Generation and Optimization (CGO). New York: ACM, 2021: 2−14
48
Gruber F, Bandle M, Engelke A, et al. Bringing compiling databases to RISC architectures[J]. Proceedings of the VLDB Endowment, 2023, 16(6): 1222−1234
49
Shaikhha A, Klonatos Y, Parreaux L, et al. How to architect a query compiler[C]//Proc of the 2016 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2016: 1907−1922
50
Gubner T, Boncz P. Excalibur: A virtual machine for adaptive fine-grained JIT-compiled query execution based on VOILA[J]. Proceedings of the VLDB Endowment, 2022, 16(4): 829−841
51
Gubner T, Boncz P. Charting the design space of query execution using VOILA[J]. Proceedings of the VLDB Endowment, 2021, 14(6): 1067−1079
52
MLIR Community. MLIR language reference: Dialects [EB/OL]. [2023-12-15].https://mlir.llvm.org/docs/LangRef/#dialects
53
Kohn A, Leis V, Neumann T. Adaptive execution of compiled queries[C]//Proc of the 34th IEEE Int Conf on Data Engineering (ICDE). Piscataway, NJ: IEEE, 2018: 197−208
54
Menon P, Ngom A, Ma Lin, et al. Permutable compiled queries: Dynamically adapting compiled queries without recompiling[J]. Proceedings of the VLDB Endowment, 2020, 14(2): 101−113
55
Funke H, Mühlig J, Teubner J. Low-latency query compilation[J]. The VLDB Journal, 2022, 31(6): 1171−1184
56
Chen Tianqi, Moreau T, Jiang Ziheng, et al. TVM: An automated end-to-end optimizing compiler for deep learning[C]//Proc of the 13th USENIX Symp on Operating Systems Design and Implementation (OSDI). Berkeley, CA: USENIX Association, 2018: 578−594
57
Damme P, Birkenbach M, Bitsakos C, et al. DAPHNE: An open and extensible system infrastructure for integrated data analysis pipelines[C/OL]//Proc of the 12th Conf on Innovative Data Systems Research (CIDR). 2022 [2023-09-19].https://www.cidrdb.org/cidr2022/papers/p4-damme.pdf
58
Behm A, Palkar S, Agarwal U, et al. Photon: A fast query engine for lakehouse systems[C]//Proc of the 2022 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2022: 2326−2339
59
Kersten T, Neumann T. On another level: How to debug compiling query engines[C/OL]//Proc of the 8th Int Workshop on Testing Database Systems. New York: ACM, 2020[2023-11-28].https://dl.acm.org/doi/pdf/10.1145/3395032.3395321
60
Pirk H, Moll O, Zaharia M, et al. Voodoo-a vector algebra for portable database performance on modern hardware[J]. Proceedings of the VLDB Endowment, 2016, 9(14): 1707−1718
61
Chinta K, Li Quan, Kleider M, et al. Fast and predictable performance with serverless compilation using Amazon Redshift [EB/OL]. [2023-06-13].https://aws.amazon.com/cn/blogs/big-data/fast-and-predictable-performance-with-serverless-compilation-using-amazon-redshift/
62
Gubner T, Boncz P A. Highlighting the performance diversity of analytical queries using VOILA[C]//Proc of the 12th Int Workshop on Accelerating Analytics and Data Management Systems Using Modern Processor and Storage Architectures (ADMS). New York: ACM, 2021: 47−54
2024年第61卷第7期
77
32
0
引用本文
BibTeX
文章信息
doi: 10.7544/issn1000-1239.202330507
  • 接收时间:2023-06-15
  • 首发时间:2026-11-17
  • 出版时间:2024-07-01
补充材料
相关文章
文章信息
作者
出版历史
  • 收稿日期:2023-06-15
  • 修回日期:2024-01-03
基金
作者信息
    1华东师范大学数据科学与工程学院 上海 200062
    2上海市大数据管理系统工程研究中心(华东师范大学) 上海 200062

通讯作者:

参考文献
分享链接
https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/10.7544/issn1000-1239.202330507
分享至
全文二维码

扫描看全文

引用本文
BibTeX
本文的引用情况
2种不同金属材料的力学参数
科
Family
属数
Number of
genus
种数
Number of
species
占总种数比例
Percentage of
total species (%)
属
Genus
种数
Number of
species
占总种数比例
Percentage of total
species (%)
鹅膏菌科Amanitaceae 2 11 5.26 鹅膏菌属 Amanita 10 4.78
小菇科 Mycenaceae 2 12 5.74 丝盖伞属 Inocybe 5 2.39
多孔菌科 Polyporaceae 8 14 6.70 蜡蘑属 Laccaria 5 2.39
红菇科 Russulaceae 3 23 11.00 小皮伞属 Marasmius 6 2.87
小菇属 Mycena 11 5.26
光柄菇属 Pluteus 5 2.39
红菇属 Russula 17 8.13
栓菌属 Trametes 5 2.39
关闭全屏