Method of optimizing a query having an existi subquery and a not-exists subquery
    1.
    发明授权
    Method of optimizing a query having an existi subquery and a not-exists subquery 失效
    优化具有exists子查询和不存在子查询的查询的方法

    公开(公告)号:US06529896B1

    公开(公告)日:2003-03-04

    申请号:US09506471

    申请日:2000-02-17

    IPC分类号: G06F1730

    摘要: An optimization technique for SQL queries, a program storage device storing the optimization program, and an apparatus for optimizing a query is provided. A query is analyzed to determine whether it includes the WHERE clause which contains an “EXISTS” subquery and a “NOT EXISTS” subquery, or EXISTS-equivalent subqueries, in Boolean factor. If so, the subsumption test is performed on two subqueries. Then, the compensation predicate is applied to one of them, to perform the QGM transformation of the query. One subquery block is stacked on top of the other subquery block, in order to eliminate one subquery. This procedure allows the transformed query to perform more efficiently than the original query while providing same results. The query is then executed in the computer to efficiently retrieve data from the relational database.

    摘要翻译: 提供了一种用于SQL查询的优化技术,存储优化程序的程序存储设备以及用于优化查询的设备。 分析查询以确定它是否包含WHERE子句,其中包含“EXISTS”子查询和“NOT EXISTS”子查询,或EXISTS等效的子查询(Boolean factor)。 如果是这样,则在两个子查询上执行包含测试。 然后,将补偿谓词应用于其中一个,执行查询的QGM转换。 一个子查询块堆叠在另一个子查询块的顶部,以消除一个子查询。 此过程允许转换的查询执行比原始查询更高效,同时提供相同的结果。 然后在计算机中执行查询以有效地从关系数据库检索数据。

    Automatic recognition and rerouting of queries for optimal performance
    2.
    发明授权
    Automatic recognition and rerouting of queries for optimal performance 有权
    自动识别和重新路由查询以获得最佳性能

    公开(公告)号:US06460027B1

    公开(公告)日:2002-10-01

    申请号:US09152559

    申请日:1998-09-14

    IPC分类号: G06F1730

    摘要: A method, apparatus, and article of manufacture for optimizing database queries uses a derived summary table, wherein a definition of the summary table is based on a full select statement that is materialized in the table and describes how the summary table was derived. The summary table definition can be a complex query involving nested GROUP BY operations as well as complex HAVING clauses with subqueries or join operations. A query is analyzed using subsumption tests between the query and the definition of the summary table to determine whether expressions occurring anywhere in the query, but not in the summary table, can be subsumed in the summary table. In performing the query, an expression in the query is subsumed in the summary table when the expression can be re-derived from one or more of the columns of the summary table.

    摘要翻译: 用于优化数据库查询的方法,装置和制品使用派生汇总表,其中汇总表的定义基于在表中实现的完整选择语句,并描述汇总表的衍生方式。 汇总表定义可以是涉及嵌套GROUP BY操作的复杂查询以及具有子查询或连接操作的复杂HAVING子句。 使用查询和摘要表定义之间的包含测试来分析查询,以确定在查询中的任何地方发生的表达式,但不在汇总表中是否可以包含在汇总表中。 在执行查询时,当表达式可以从汇总表的一个或多个列中重新导出时,查询中的表达式将被包含在汇总表中。

    Query optimization by transparently altering properties of relational tables using materialized views
    3.
    发明授权
    Query optimization by transparently altering properties of relational tables using materialized views 有权
    通过使用实例化视图透明地更改关系表的属性来进行查询优化

    公开(公告)号:US06339769B1

    公开(公告)日:2002-01-15

    申请号:US09152551

    申请日:1998-09-14

    IPC分类号: G06F1730

    摘要: A method, apparatus, and article of manufacture for optimizing database queries using a materialized view for a table referenced in the query, wherein the materialized view has different properties than the referenced table. The materialized view may be replicated across multiple processors of the computer system, so that some or all of the query can be executed in a local fashion wherein there is no data movement required to perform the operations. The materialized view also may be partitioned across multiple processors of the computer system using a different partitioning key than the referenced table. The materialized view may be a vertical and/or horizontal subset of the table, so that only selected columns and/or tuples from the table are present therein. Columns may be added to the materialized view to contain pre-computed results of complex expressions, and indices may be created on the columns of the materialized view.

    摘要翻译: 使用查询中引用的表的实例化视图优化数据库查询的方法,装置和制品,其中物化视图具有与所引用的表不同的属性。 实体化视图可以复制在计算机系统的多个处理器上,使得可以以本地方式执行部分或全部查询,其中不存在执行操作所需的数据移动。 实体化视图还可以使用与参考表不同的分区键在计算机系统的多个处理器上分区。 实例化视图可以是表的垂直和/或水平子集,使得仅在表中存在所选择的列和/或元组。 可以将列添加到物化视图以包含复合表达式的预计算结果,并且可以在物化视图的列上创建索引。

    Method of simplifying and optimizing scalar subqueries and derived tables that return exactly or at most one tuple
    5.
    发明授权
    Method of simplifying and optimizing scalar subqueries and derived tables that return exactly or at most one tuple 失效
    简化和优化标量子查询和派生表的方法,它们完全返回或最多返回一个元组

    公开(公告)号:US06826562B1

    公开(公告)日:2004-11-30

    申请号:US09450795

    申请日:1999-11-29

    IPC分类号: G06F1730

    摘要: An optimization technique for SQL queries, a program storage device storing the optimization program, and an apparatus for optimizing a query is provided. A query is analyzed to determine whether it includes subselect expressions that return exactly or at most one tuple. If so, the quantifier merger or elimination is performed, if possible, to allow query to perform more efficiently than that of the original query while providing same results. The query is then executed in the computer to efficiently retrieve data from the database.

    摘要翻译: 提供了一种用于SQL查询的优化技术,存储优化程序的程序存储设备以及用于优化查询的设备。 分析查询以确定它是否包括精确返回或最多返回一个元组的子选择表达式。 如果是这样,如果可能,执行量化器合并或消除,以允许查询比原始查询的执行效率更高,同时提供相同的结果。 然后在计算机中执行查询以有效地从数据库中检索数据。

    Evaluation of existential and universal subquery in a relational
database management system for increased efficiency
    6.
    发明授权
    Evaluation of existential and universal subquery in a relational database management system for increased efficiency 失效
    在关系数据库管理系统中评估存在性和通用子查询,以提高效率

    公开(公告)号:US6032143A

    公开(公告)日:2000-02-29

    申请号:US206194

    申请日:1998-12-04

    IPC分类号: G06F17/30

    摘要: A relational data base management system includes a query processor that permits consideration of alternative query plans by the query optimizer so one table can be sent to a selected network location for subquery evaluation in consideration of maximum processing efficiency. Subqueries are converted from "predicate push-down" form to scalar subqueries, enabling upper tables to be sent to nodes of lower tables and vice versa, thereby permitting selection of the node direction depending on the least cost alternative. The optimizer of the query processor is presented with rewritten query code that permits more than one alternative for sending tables for evaluation. The optimizer evaluates the alternatives permitted by the rewritten code, determines the optimal plan for each alternative, and selects the least-cost plan from among the plans evaluated. Thus, the optimizer can decide to send an outer table to where a subquery table is located, or can decide to send a subquery table to where an outer table is located, depending on which is more efficient.

    摘要翻译: 关系数据库管理系统包括查询处理器,其允许由查询优化器考虑替代查询计划,因此考虑到最大处理效率,可以将一个表发送到所选网络位置进行子查询评估。 子查询从“谓词下推”形式转换为标量子查询,使得上表可以发送到下表的节点,反之亦然,从而允许根据最低成本替代方案选择节点方向。 查询处理器的优化器被呈现为重写的查询代码,其允许用于发送表进行评估的多个替代方案。 优化器评估重写代码允许的替代方案,确定每个替代方案的最佳计划,并从评估的计划中选择最低成本计划。 因此,优化器可以决定将外部表发送到子查询表所在的位置,或者可以决定将子查询表发送到外部表所在的位置,具体取决于哪个更有效。

    Method of optimizing SQL queries where a predicate matches nullable operands
    9.
    发明授权
    Method of optimizing SQL queries where a predicate matches nullable operands 有权
    优化SQL查询的方法,其中谓词与可空操作数匹配

    公开(公告)号:US06996557B1

    公开(公告)日:2006-02-07

    申请号:US09504086

    申请日:2000-02-15

    IPC分类号: G06F7/00

    摘要: An optimization technique for SQL queries, a program storage device storing the optimization program, and an apparatus for optimizing a query is provided. A query is analyzed to determine whether it includes a predicate for matching nullable operands and, if so, it is transformed to return TRUE when all operands are NULLs. If the DBMS supports this new function, the predicate is marked. If not, the predicate is re-written into a CASE expression having two SELECT clauses. The query is then executed in the computer to efficiently retrieve data from the relational database.

    摘要翻译: 提供了一种用于SQL查询的优化技术,存储优化程序的程序存储设备以及用于优化查询的设备。 分析查询以确定它是否包含用于匹配可空操作数的谓词,如果是,则在所有操作数都为空时将其转换为TRUE。 如果DBMS支持这个新功能,则会标记谓词。 如果没有,则将谓词重新写入具有两个SELECT子句的CASE表达式。 然后在计算机中执行查询以有效地从关系数据库检索数据。

    Method of optimally determining lossless joins

    公开(公告)号:US06601063B2

    公开(公告)日:2003-07-29

    申请号:US10154205

    申请日:2002-05-23

    IPC分类号: G06F1730

    摘要: A method, apparatus, and article of manufacture for optimizing a query being performed by a computer system to retrieve data from a database stored on the computer system. The query is analyzed to identify any joins therein that are lossless and to identify any tables of the identified joins that are eligible for removal. This analysis includes partitioning the joins into lossless and lossy joins, and partitioning the tables of the joins according to their associated quantifiers, wherein each of the quantifiers has a quantifier state indicating whether the table participates in a join that is lossless. The query is then rewritten to eliminate the identified tables that are eligible for removal.