首页> 外国专利> System and method for optimizing database queries with improved performance enhancements

System and method for optimizing database queries with improved performance enhancements

机译:通过改进的性能优化数据库查询的系统和方法

摘要

A system and method for optimizing a database query with improved performance enhancements is herein disclosed. The database query consists of one or more logical expressions. Through the repeated application of one or more rules, the logical expressions are transformed into execution plans. The query optimizer partitions the database query into one or more subproblems with each subproblem consisting of one or more logical expressions. A plan is obtained for each subproblem with the plan for the database query including the plans for each subproblem. The query optimizer is cost-based and uses rules including transformation and implementation rules that are used to perform transformations on the logical expressions in a subproblem in order to produce a plan. The rules are classified into context-free and context-sensitive in order to avoid generating duplicate expressions. Context-free rules are applied once for each logical expression and context-sensitive rules are applied once for each logical expression for a particular optimization goal. In a preferred embodiment, the query optimizer performs several optimization passes over the database query in order to obtain an optimal plan. For each pass, if no optimal plan exists for the requested optimization goal, existing plans having the same optimization goal are utilized with each input reoptimized for a more cost effective plan.
机译:本文公开了一种用于以改进的性能增强来优化数据库查询的系统和方法。数据库查询由一个或多个逻辑表达式组成。通过重复应用一个或多个规则,逻辑表达式将转换为执行计划。查询优化器将数据库查询划分为一个或多个子问题,每个子问题由一个或多个逻辑表达式组成。为每个子问题获得一个计划,并为数据库查询提供一个计划,其中包括每个子问题的计划。查询优化器是基于成本的,并使用包括转换和实现规则的规则,这些规则用于对子问题中的逻辑表达式执行转换以生成计划。规则分为上下文无关和上下文敏感,以避免生成重复的表达式。对于特定的优化目标,无上下文规则仅对每个逻辑表达式应用一次,而上下文敏感规则仅对每个逻辑表达式应用一次。在优选实施例中,查询优化器对数据库查询执行几次优化遍历以获得最佳计划。对于每个遍,如果不存在针对请求的优化目标的最佳计划,则将具有相同优化目标的现有计划与每个输入重新优化以使用更具成本效益的计划。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号