摘要
作为开源数据库的代表,PostgreSQL的应用范围越来越广泛。文中的目的是研究PostgreSQL查询优化器的工作原理,介绍了PostgreSQL查询优化器的工作流程,分析了PostgreSQL查询优化器的工作原理,深入剖析了PostgreSQL查询优化器实现的具体细节和采用的两种优化算法。结合图论中查找最小生成树的算法提出了改进策略,并简要论证了可行性。研究发现,PostgreSQL查询优化器可以处理任意复杂的请求,并能尽快地给出比较合理的执行路径。
As a representative of open-source database,PostgreSQL has been used more and more widely.The purpose is to study the work principle of PostgreSQL optimizer.Introduces the architecture of PostgreSQL and the workflow of the optimizer,then analyses the optimization principle.After that,dissect the two algorithms as well as their implementation details applied in PostgreSQL.Finally,gives an improved strategy based on MST.The conclusion is that PostgreSQL's optimizer can handler arbitrarily complex SQL request and can give very reasonable execute path as soon as possible.
出处
《计算机技术与发展》
2011年第8期141-144,共4页
Computer Technology and Development
基金
国家自然科学基金资助项目(70771077)
国家高技术研究发展计划(863计划)项目(2008AA04Z106)
上海市科委项目(08DZ1122300)
上海市信息化发展专项资金项目(200901015)