首页> 外国专利> Accelerating Queries Based on Exact Knowledge of Specific Rows Satisfying Local Conditions

Accelerating Queries Based on Exact Knowledge of Specific Rows Satisfying Local Conditions

机译:基于特定行满足当地条件的确切知识来加速查询

摘要

A method, computer program product, and system are provided for accelerating a query in a database system. For example, an embodiment of the method may include generating a data structure identifying a set of rows that satisfy conditions local to a table prior to an evaluation of a query and modifying the query based on the data structure. In addition, the method may include repeating the steps with respect to generating the data structure and modifying the query, if one or more additional local conditions are inferred from modifying the query based on the data structure. With respect to the step of modifying the query based on the data structure, in the case where no rows satisfy the local conditions in the data structure, an always false prefilter condition may be migrated as high as possible within the query. When only one row satisfies the local conditions in the data structure, a column may be replaced by a constant value from within that column in that one row. Further, in the case where a moderate number of rows satisfy the local conditions in the data structure and if sensible from a cost basis analysis, an IN condition may be inferred for each column from that table involved in a join condition. Application of these modifications prior to a determination of a query execution plan allows a query to be executed more efficiently and with far lower risk of applying a suboptimal execution plan.
机译:提供了一种用于加速数据库系统中的查询的方法,计算机程序产品和系统。例如,该方法的实施例可以包括:在评估查询之前,生成标识满足表局部条件的一组行的数据结构,并基于该数据结构来修改查询。另外,如果从基于数据结构的修改查询中推断出一个或多个其他局部条件,则该方法可以包括重复关于生成数据结构和修改查询的步骤。关于基于数据结构修改查询的步骤,在没有任何行满足数据结构中的本地条件的情况下,始终错误的预过滤条件可能在查询中尽可能高地迁移。当只有一行满足数据结构中的局部条件时,可以用该行中该列内的常量值替换一列。此外,在中等数量的行满足数据结构中的局部条件的情况下,并且如果从成本基础分析出发是明智的,则可以从涉及联接条件的该表的每一列中推断出IN条件。在确定查询执行计划之前应用这些修改可以使查询更有效地执行,并且应用次优执行计划的风险要低得多。

著录项

  • 公开/公告号US2009171921A1

    专利类型

  • 公开/公告日2009-07-02

    原文格式PDF

  • 申请/专利权人 STEVEN A. KIRK;DAVID E. WALRATH;

    申请/专利号US20070966611

  • 发明设计人 STEVEN A. KIRK;DAVID E. WALRATH;

    申请日2007-12-28

  • 分类号G06F17/30;

  • 国家 US

  • 入库时间 2022-08-21 19:34:13

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号