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转换。 一个子查询块堆叠在另一个子查询块的顶部,以消除一个子查询。 此过程允许转换的查询执行比原始查询更高效,同时提供相同的结果。 然后在计算机中执行查询以有效地从关系数据库检索数据。

    Evaluation of existential and universal subquery in a relational
database management system for increased efficiency
    2.
    发明授权
    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.

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

    APPARATUS AND METHOD FOR SKIPPING XML INDEX SCANS WITH COMMON ANCESTORS OF A PREVIOUSLY FAILED PREDICATE
    6.
    发明申请
    APPARATUS AND METHOD FOR SKIPPING XML INDEX SCANS WITH COMMON ANCESTORS OF A PREVIOUSLY FAILED PREDICATE 有权
    用于将先前失败的预测的常规防御者拖放XML索引扫描的装置和方法

    公开(公告)号:US20080154893A1

    公开(公告)日:2008-06-26

    申请号:US11613757

    申请日:2006-12-20

    IPC分类号: G06F17/30

    摘要: An apparatus and method are disclosed for skipping XML index scans with common ancestors of a previously failed predicate. An XML index is scanned by an XML index scan to filter entries of the index matching at least one search value (predicate) of an XML query. When the XML index scan finds a matching entry, the entry is passed to an XPath evaluation component. The XPath evaluation component evaluates the entry against remaining predicates of the XML query for further qualification. When the XPath evaluation component disqualifies an entry, the XPath evaluation component provides feedback to the XML index scan to skip remaining entries comprising a common ancestor of the disqualified entry's path. The XML index scan can then efficiently skip index entries that will not qualify against the XML query.

    摘要翻译: 公开了一种用于跳过具有先前故障谓词的共同祖先的XML索引扫描的装置和方法。 通过XML索引扫描扫描XML索引,以过滤与XML查询的至少一个搜索值(谓词)匹配的索引的条目。 当XML索引扫描找到匹配的条目时,该条目将传递给XPath评估组件。 XPath评估组件根据XML查询的剩余谓词评估条目以进一步验证。 当XPath评估组件取消条目资格时,XPath评估组件向XML索引扫描提供反馈,以跳过包含不合格条目路径的共同祖先的剩余条目。 然后,XML索引扫描可以有效地跳过不符合XML查询条件的索引条目。

    Method of optimizing SQL queries where a predicate matches nullable operands
    7.
    发明授权
    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表达式。 然后在计算机中执行查询以有效地从关系数据库检索数据。

    Supporting dynamic tables in SQL query compilers
    9.
    发明授权
    Supporting dynamic tables in SQL query compilers 失效
    在SQL查询编译器中支持动态表

    公开(公告)号:US5930795A

    公开(公告)日:1999-07-27

    申请号:US786603

    申请日:1997-01-21

    IPC分类号: G06F17/30

    CPC分类号: G06F17/30421 G06F17/30474

    摘要: A framework for a query compiler and run-time environment for resolving a table reference to a dynamic table that is first identified at run-time but is initially unknown at compile-time. A parser parses the table reference and creates a parsed representation for the table that identifies the type of dynamic table. A code generator creates executable plans containing run-time table object representations (TAOB), from the parsed representations, that contain the type of dynamic table. The TAOB is also extended to provide for parameters that are definable at run-time, including a table ID of the actual table entity being referenced. A routine is embedded in a run-time routine that checks the type of dynamic table in the TAOB and dispatches control to one of a plurality of corresponding routines, depending upon the type of dynamic table. The corresponding routines use the extended TAOB to dynamically link the table reference to the dynamic table, depending upon the type of dynamic table. Once the dynamic table has been linked to the table reference, query processing continues as if that table were a base or derived table.

    摘要翻译: 用于查询编译器和运行时环境的框架,用于解析对运行时首先标识但最初在编译时未知的动态表的表引用。 解析器解析表引用,并创建用于标识动态表类型的表的解析表示。 代码生成器从解析的表示形式创建包含运行时表对象表示(TAOB)的可执行计划,其中包含动态表的类型。 TAOB还被扩展以提供在运行时可定义的参数,包括被引用的实际表实体的表ID。 例程被嵌入到运行时程序中,该运行时程序检查TAOB中的动态表的类型,并根据动态表的类型将控制调度到多个相应的例程之一。 相应的例程使用扩展TAOB来动态地将表引用动态链接到动态表,这取决于动态表的类型。 一旦将动态表链接到表引用,查询处理将继续进行,就像该表是基类或派生表一样。

    Synchronization of SQL actions in a relational database system
    10.
    发明授权
    Synchronization of SQL actions in a relational database system 失效
    在关系数据库系统中同步SQL操作

    公开(公告)号:US5873075A

    公开(公告)日:1999-02-16

    申请号:US884832

    申请日:1997-06-30

    IPC分类号: G06F17/30

    摘要: An automated system for detecting and preventing mutating table violations of database integrity in a SQL query before generation and selection of an optimal query execution plan (QEP). This system modifies the query graph model (QGM) to restrict the choice of execution plans to those that avoid mutating table integrity (MTI) violations, thereby forcing database integrity during table mutation when executing the optimal QEP. Mutating table integrity violations are detected by evaluating the position in the QGM of each write-node referencing a particular base table with respect to each of the positions of all other read- and write-nodes referencing of the same base table. Every common-referencing node pair is tested for sequencing conflicts and a data-flow dam is inserted in the QGM where necessary or a poke query is inserted between the nodes to force the completion of the execution of one node before initiating execution of the other common-referencing node. The system of this invention allows processing of all non-cyclic and most cyclic SQL queries known to cause mutating table integrity violations, such as queries having searched and positioned inserts, deletes and updates, and row-level triggers.

    摘要翻译: 一种用于在生成和选择最优查询执行计划(QEP)之前,在SQL查询中检测和防止突变表违反数据库完整性的自动化系统。 该系统修改查询图模型(QGM),将执行计划的选择限制为避免突变表完整性(MTI)违规的选择,从而在执行最佳QEP时强制表突变期间的数据库完整性。 通过评估参考相同基准表的所有其他读 - 写节点的每个位置的引用特定基表的每个写节点的QGM中的位置来检测突变表完整性违反。 每个公共参考节点对都进行排序冲突测试,并且数据流大坝插入到QGM中,如果需要,或者在节点之间插入一个戳查询,强制完成一个节点的执行,然后再启动另一个常见的执行 - 参考节点。 本发明的系统允许处理已知导致突变表完整性违例的所有非循环和大多数循环SQL查询,例如具有搜索和定位的插入,删除和更新的查询以及行级触发器。