《MatrixOne: HTAP 數據庫中的 OLAP 設.pdf》由會員分享,可在線閱讀,更多相關《MatrixOne: HTAP 數據庫中的 OLAP 設.pdf(40頁珍藏版)》請在三個皮匠報告上搜索。
1、DataFunSummitDataFunSummit#20232023MatrixOneMatrixOne:HTAPHTAP數據庫數據庫中的中的OLAPOLAP設計設計龍冉 矩陣起源 研發工程師MatrixOne 簡介矩陣起源是一家數據庫創業公司,致力于打造開源超融合異構數據庫MatrixOne,MatrixOne是一款面向未來的超融合異構云原生數據庫管理系統。通過全新設計和研發的統一分布式數據庫引擎,能夠同時靈活支持OLTP、OLAP、Streaming等不同工作負載的數據管理和應用,用戶可以在公有云、自建數據中心和邊緣節點上無縫部署和運行。Github:https:/ MatrixOne
2、整體整體架構架構MatrixOne OLAP MatrixOne OLAP 引擎引擎TPC-H TPC-H 測試測試結果結果目錄目錄 CONTENTCONTENTDataFunSummitDataFunSummit#202320230101MatrixOneMatrixOne整體架構整體架構OverviewFile serviceLog serviceData nodeComputation nodeHA keeperRead dataTAE(Transactional Analytical Engine)DataFunSummitDataFunSummit#202320230202MOMO的
3、的OLAPOLAP計算引擎計算引擎OLAP需要具備的SQL能力 多表join 子查詢 窗口函數 CTE/Recursive CTE UDF 計算引擎構成ParserPlannerOptimizerExecutionAST TreeLogical NodePhysical OperatorLogical Node1.Bind(Algebrizer)2.子查詢消除RBOCBOPipeline Build子查詢展開 TPC-H Q2,4,11,16,17,18,20,21,22子查詢展開 select s.name,e.coursefrom students s,exams ewhere s.id=
4、e.sid ande.grade=(select min(e2.grade)from exams e2where s.id=e2.sid)子查詢展開(HyPer)展開前展開前展開后展開后子查詢展開(MatrixOne)展開前展開前 select s.name,e.coursefrom students s,exams ewhere s.id=e.sid ande.grade=(select min(e2.grade)from exams e2where s.id=e2.sid)展開后展開后 select s.name,e.coursefrom students s,exams e,(selec
5、t sid,min(e2.grade)as min_grade from exams e2 group by e2.sid)e3where s.id=e.sid ande.grade=e3.min_grade and s.id=e3.sidOptimizer 減少IO 列裁剪 謂詞下推 謂詞推斷:q7 q19 Runtime filter:q18Optimizer 減少計算 Join order:q2 q5 q7 q8 q9 q21 聚合下推/上拉:q13 q17 Groupjoin謂詞推斷(TPC-H Q19)Join order(改進的貪心法)Join order(改進的貪心法)確定事實表
6、與維度表Join order(改進的貪心法)確定事實表與維度表 各事實表與其維度表join成子樹Join order(改進的貪心法)確定事實表與維度表 各事實表與其維度表join成子樹 先與過濾性好的維度表joinJoin order(改進的貪心法)確定事實表與維度表 各事實表與其維度表join成子樹 先與過濾性好的維度表join 子樹之間用經典Join order算法Join order(改進的貪心法)TPC-H Q5lineitemsuppliercustomerregionordersnationTPC-H Q5lineitemsuppliercustomerregionordersna
7、tion謂詞推斷+Join orderlineitemsuppliercustomerregionordersnation謂詞推斷+Join orderlineitemsuppliercustomerregionordersnationExecution:PipelinePush模型基于不同的Operator組成流水線Pipeline自底向上Push調度,以數據為中心而非Operator為中心Logical Plan 后序遍歷即可得到基礎Pipeline結構Morsel-Driven Parallelism 以Task Queue為核心調度Pipeline,每個數據塊的單位稱為Morsel一個
8、任務執行結束,通知調度器將后續任務加入隊列CPU空閑時,可以從其他CPU 偷取任務執行(Work Stealing)Execution:PipelineSELECT*FROM S JOIN R USING AJOIN T USING B;Execution:physical operatorsPipelineConnectorDispatchAggregateGroupLeftJoinMarkJoinSemiJoinSourceAntiJoinLoopJoinInnerJoinProjectionMergeMergeGroupMergeLimitMergeOffsetMergeOrderMer
9、geTopHashBuildRestrictDataFunSummitDataFunSummit#202320230303TPC-HTPC-H性能測試結果性能測試結果TPC-H 100GTPC-H 100GSFSFxsxs cold(0316)cold(0316)SFSFxsxs hot(0316)hot(0316)2023/6/8 eks2023/6/8 ekscoldcold29f1e8329f1e832023/6/8 eks2023/6/8 ekshothot29f1e8329f1e83Q1121067.81410.75Q24.9318.2981.75Q35.44.536.46210.7
10、3Q45.1517.59410.82Q56.46.113.8177.21Q60.490.541.7661.21Q74.44.110.85810.36Q86.2511.4285.86Q9121240.38537.1Q10109.420.38218.46Q112.51.93.7241.3Q123.12.812.295.39Q13171520.64720.83Q140.920.867.047.89Q152.71.63.9364.34Q163.53.26.5045.29Q173.93.63.4733.41Q18282516.41312.77Q195.73.58.0025.3Q203.22.92.314
11、2.55Q21121234.4631.92Q222.32.13.4873.8233.738233.738151.71 151.71 134.10 134.10 361.09 361.09 219.06 219.06 感謝觀看感謝觀看歡迎加入歡迎加入 MatrixOneMatrixOne Beta Beta ProgramProgram 用戶體驗計劃用戶體驗計劃MatrixOne Beta Program 是矩陣起源全新推出的,與客戶、用戶一起持續提升 MatrixOne 產品和性能體驗優化的計劃。加入 MatrixOne Beta ProgramStep1:掃描下方小程序碼提交注冊Step2:
12、MO架構師將會通過郵件的方式進行初步聯系和溝通Step3:加入 Beta Program 社區,開始您和 MatrixOne 的旅程新功能內測權益新功能內測權益產品設計參與權益產品設計參與權益新功能本地環境優先測試權益新功能本地環境優先測試權益開發過程的直接發言權益開發過程的直接發言權益專家端到端專業支持權益專家端到端專業支持權益FEBMARAPRMAYJUNJULMatrixOne產品路線Beta Program2023年活動計劃MOE v0.7MOC AlphaMOE v0.9線上研討會Beta Program 發布Private Beta(僅邀請)Public Beta(公開招募)MO GA線下客戶交流沙龍線下客戶交流沙龍線下客戶交流沙龍行業合作伙伴沙龍產品發布會行業合作伙伴沙龍MOE 加入加入 MatrixOneMatrixOne 社區群,社區群,獲取獲取 PPT PPT