计算机科学 ›› 2026, Vol. 53 ›› Issue (8): 1-8.doi: 10.11896/jsjkx.250900007
沈峰寅1, 范红杰2
SHEN Fengyin1, FAN Hongjie2
摘要: 文中提出了一种面向业务场景的多层级SQL优化框架,通过解耦业务逻辑与通用计算,构建前置规则引擎和后置计算引擎的协同架构。前置SQL优化器聚焦于业务具体优化,后置SQL计算引擎专注于通用大数据计算,通过封装与集成现有流批一体计算引擎,实现高效计算。通过将优化策略划分为面向业务特性的规则优化和基于计算框架的通用执行优化两个层级,实现优化策略模块化与可迭代性。深入优化策略设计与实现,采用规则引擎驱动的前置SQL优化器,结合通用大数据计算引擎,实现面向业务的外部数据源下推、多生产任务合并优化,解决数据倾斜、代码生成超限等业务常见实际问题。实验通过外部数据源下推测试、多任务合并测试、数据倾斜负载优化测试,证明在字段裁剪、任务合并等多个真实场景下所提出框架可分别提升性能49.8%和79.75%,整体优化了大数据生产任务的执行性能,且通过解耦业务计算与通用计算这一设计思想,为大数据场景下的高效SQL优化执行提供了创新性解决方案。
中图分类号:
| [1] UZZAMAN A,JIM M M I,NISHAT N,et al.Optimizing SQL databases for big data workloads:techniques and best practices[J].Academic Journal on Business Administration,Innovation &Sustainability,2024,4(3):15-29. [2] ZHANG C,LI G L,FENG J H,et al.Survey of Key Techniques of HTAP Databases[J].Journal of Software,2023,34(2):761-785. [3] HAYAMIZU Y,KAWAMICHI R,OZAWA T,et al.anagodb:Offering Massive Parallelism for Database Engine[C]//Companion of the 2025 International Conference on Management of Data.2025:115-118. [4] GRAEFE G.The cascades framework for query optimization[J].IEEE Data Engineering Bulletin,1995,18(3):19-29. [5] SOLIMAN M A,ANTOVA L,RAGHAVAN V,et al.Orca:a modular query optimizer architecture for big data[C]//Procee-dings of the ACM SIGMOD International Conference on Management of Data.2014:337-348. [6] SIDDIQUI T,JINDAL A,QIAO S,et al.Cost models for big data query processing:Learning,retrofitting,and our findings[C]//Proceedings of the ACM SIGMOD International Confe-rence on Management of Data.2020:99-113. [7] JINDAL A.Query optimizer as a service:An idea whose timehas come![J].ACM SIGMOD Record,2022,51(3):49-55. [8] WU P,KANG R,ZHANG T,et al.Data-Agnostic CardinalityLearning from Imperfect Workloads[J].Proceedings of VLDB Endowment,2025,18(8):2519-2532. [9] DEAN J,GHEMAWAT S.MapReduce:simplified data processing on large clusters[J].Communications of the ACM,2008,51(1):107-113. [10] THUSOO A,SARMA J S,JAIN N,et al.Hive:a warehousing solution over a map-reduce framework[J].Proceedings of VLDB Endowment,2009,2(2):1626-1629. [11] SALLOUM S,DAUTOV R,CHEN X,et al.Big data analytics on Apache Spark[J].International Journal of Data Science and Analytics,2016,1(3):145-164. [12] CHAWLA M,BANIWAL V.Optimization in the catalyst optimizer of Spark SQL[J].Turkish Journal of Electrical Enginee-ring and Computer Sciences,2018,26(5):2489-2499. [13] CARBONE P,KATSIFODIMOS A,EWEN S,et al.Apacheflink:Stream and batch processing in a single engine[J].The Bulletin of the Technical Committee on Data Engineering,2015,38(4):28-38. [14] BEGOLI E,CAMACHO-RODRÍGUEZ J,HYDE J,et al.Apache calcite:A foundational framework for optimized query processing over heterogeneous data sources[C]//Proceedings of the 2018 International Conference on Management of Data.2018:221-230. [15] PROUT A,WANG S P,VICTOR J,et al.Cloud-native transactions and analytics in singlestore[C]//Proceedings of the 2022 International Conference on Management of Data.2022:2340-2352. [16] PAN Q F,XU C.Advances in SQL Execution Techniques Based on Query Compilation[J].Journal of Computer Research and Development,2024,61(7):1754-1770. [17] BACON D,BALES N.Spanner:Becoming a SQL system[C]//Proceedings of the ACM International Conference on Management of Data.2017:331-343. [18] POWER C,PATEL H,JINDAL A,et al.The cosmos big data platform atmicrosoft:Over a decade of progress and a decade to look forward[J].Proceedings of the VLDB Endowment,2021,14(12):3148-3161. [19] VAVILAPALLI K,MURTHY C.Apache Hadoop yarn:Yetanother resource negotiator[C]//Proceedings of the 4th Annual Symposium on Cloud Computing.2013:1-16. [20] CHEN J,SHI R.Krypton:real-time serving and analytical SQL engine at ByteDance[J].Proceedings of the VLDB Endowment,2023,16(12):3528-3542. [21] ALOTAIBI R,TIAN Y,GRAFBERGER S,et al.Towards Query Optimizer as a Service(QOaaS) in a Unified LakeHouse Ecosystem:Can One QO Rule Them All?[J].arXiv:2411.13704,2024. |
|
||