欢迎来到天天文库
浏览记录
ID:32682645
大小:3.32 MB
页数:39页
时间:2019-02-14
《galy PostgreSQL架构入门》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、PostgreSQL的体系架构李元佳2013Postgres中国大会杭州8.2以前的更新HOTHOT–更新的机制HOT-旧空间的再利用SQL引擎1.createstudent(name=c10,age=i4,sex=c1,state=c2)2.rangeofsisstudent3.appendtos(name="philip",age=17,sex="m",state="FL")4.retrieve(s.all)wheres.state="FL"5.replaces(age=s.age+1)6.retrieve(s.all)7.deleteswheres.name="philip"Quel1.
2、createtablestudent(namechar(10),ageint,sexchar(1),statechar(2))2.insertintostudent(name,age,sex,state)values("philip",17,"m","FL")3.select*fromstudentwherestate="FL"4.updatestudentsetage=age+15.select*fromstudent6.deletefromstudentwherename="philip"SQL查询语言:QuelandSQL执行计划:复杂任务的工作流LeftDeepTreeBushyTre
3、eRightDeepTree查询优化的必要性优化的核心算法:DynamicProgrammingExecutor◦Executingtheplantree,pulltheresultandsendtotheclientExecutingStrategy:DemandPullPipeLine◦Pull:由计划树的上层节点往下抽取记录◦Demand:需要的时候才抽取◦PipeLine:一次处理一条记录Advantage◦Lowerlatency◦Theoperatormaynotneedtobecompletelyevaluatede.g.cursors,INandEXISTSsubque
4、ries,LIMIT,etc.◦PipelinedoperatorsrequirelessstateSincematerializedstateoftenexceedsmainmemory,wemayneedtoputittodiskfornon-pipelinedoperatorsExecutor
此文档下载收益归作者所有