Hash-based database grouping system and method
    3.
    发明授权
    Hash-based database grouping system and method 失效
    基于哈希的数据库分组系统和方法

    公开(公告)号:US5511190A

    公开(公告)日:1996-04-23

    申请号:US376026

    申请日:1995-01-20

    IPC分类号: G06F17/30

    摘要: A structured query language (SQL) grouping and aggregation system and method that incorporates hash-based techniques, several overflow handling strategies and statistics-based process-selection criteria. The method can execute SQL group-by queries on distributed database tables or tables stored locally to the database management system (DBMS) processor executing the grouping method. Hash-based techniques allow groupings and aggregates to be generated on the fly through the use of partial aggregates maintained in primary memory. Where primary memory is limited, groups and aggregates are still generated for as many groups as can be maintained in primary memory, while various overflow procedures are provided for buffering ungrouped data and writing that data to an overflow disk file for later processing. In one overflow procedure, raw data from groups that cannot be aggregated in primary memory are buffered then written to the overflow disk file. In a second overflow procedure, ungroupable raw data is formatted the same as data being aggregated in the group table, buffered, and then written to the overflow file. In a third overflow procedure, ungroupable raw data is partially aggregated in an output buffer maintained in primary memory before being written to the overflow file maintained in secondary memory. Database table statistics maintained by a cataloger are consulted to determine whether hash-based grouping or conventional sort based grouping should be used to execute a group-by query. The system is adaptable to running a grouping query against a partitioned database on distributed processors.

    摘要翻译: 一种结构化查询语言(SQL)分组和聚合系统和方法,其中集成了基于哈希的技术,几种溢出处理策略和基于统计的流程选择标准。 该方法可以对分布式数据库表或本地存储的数据库管理系统(DBMS)处理器执行分组方法执行SQL组查询。 基于哈希的技术允许通过使用在主内存中维护的部分聚合来即时生成分组和聚合。 在主存储器受限的情况下,仍然为主存储器中可维护的组生成组和聚合,同时提供各种溢出过程以缓冲未分组数据,并将该数据写入溢出磁盘文件以备后续处理。 在一个溢出过程中,将缓冲不能在主内存中聚合的组的原始数据,然后写入溢出磁盘文件。 在第二个溢出过程中,不可分组的原始数据被格式化为在组表中聚合的数据相同,缓冲,然后写入溢出文件。 在第三个溢出程序中,将未分组的原始数据部分地聚合在主存储器中保存的输出缓冲区中,然后再写入保存在辅助存储器中的溢出文件。 查询由编目员维护的数据库表统计信息,以确定是否应使用基于散列分组或基于常规分类的分组来执行逐组查询。 该系统适用于针对分布式处理器上的分区数据库运行分组查询。

    SYSTEM AND METHOD FOR OPTIMIZING QUERIES
    6.
    发明申请
    SYSTEM AND METHOD FOR OPTIMIZING QUERIES 有权
    用于优化查询的系统和方法

    公开(公告)号:US20110060731A1

    公开(公告)日:2011-03-10

    申请号:US12554254

    申请日:2009-09-04

    IPC分类号: G06F17/30

    CPC分类号: G06F17/30469 G06F17/30474

    摘要: There is provided a computer-implemented method of optimizing a query. An exemplary method comprises determining a maximum cardinality for an operator. The query may comprise the operator. The exemplary method also comprises determining a plurality of potential implementations for the operator. The exemplary method additionally comprises generating a query plan for the query based on the maximum cardinality and the potential implementations.

    摘要翻译: 提供了一种优化查询的计算机实现的方法。 示例性方法包括确定操作者的最大基数。 查询可以包括运营商。 该示例性方法还包括确定用于操作者的多个潜在实现。 该示例性方法还包括基于最大基数和潜在实现来生成查询的查询计划。

    System and method for database query optimization
    7.
    发明授权
    System and method for database query optimization 失效
    数据库查询优化的系统和方法

    公开(公告)号:US5819255A

    公开(公告)日:1998-10-06

    申请号:US773695

    申请日:1996-12-27

    IPC分类号: G06F17/30

    摘要: 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 physical expressions and in some cases, execution plans that implement the database query. Each expression has associated with it a set of group attributes that specifies its characteristic inputs and outputs and a cost that estimates the computational expense for executing the expression. The group attributes are used to categorize similar expressions into groups that are stored in a search data structure. They are also used to track duplicate expressions. The cost associated with an expression is used to guide the search process to consider those expressions that will produce low cost plans. The cost is estimated in accordance with a six-fold criteria with each criterion weighted to account for the context of the expression and the application's particular computing environment. The query optimizer is rule-based including transformation and implementation rules that are used to perform transformations on the logical expressions in a subproblem in order to produce a plan. A OnceGuidance guidance method is used to select a set of rules in certain cases that prevent the regeneration of an existing expression.

    摘要翻译: 本文公开了一种用于优化具有改进的性能增强的数据库查询的系统和方法。 数据库查询由一个或多个逻辑表达式组成。 通过重复应用一个或多个规则,逻辑表达式被转换为物理表达式,在某些情况下,实现数据库查询的执行计划。 每个表达式与它相关联一组指定其特征输入和输出的组属性以及估计执行表达式的计算费用的成本。 组属性用于将类似表达式分组到存储在搜索数据结构中的组。 它们也用于跟踪重复表达式。 与表达式相关联的成本用于指导搜索过程来考虑将生成低成本计划的表达式。 成本按照六标准进行估算,每个标准的加权是为了说明表达式和应用程序的特定计算环境的上下文。 查询优化器是基于规则的,包括用于对子问题中的逻辑表达式执行转换以生成计划的转换和实现规则。 在一些阻止再现现有表达式的情况下,使用OnceGuidance指导方法来选择一组规则。

    System and method for optimizing queries
    8.
    发明授权
    System and method for optimizing queries 有权
    用于优化查询的系统和方法

    公开(公告)号:US08554760B2

    公开(公告)日:2013-10-08

    申请号:US12574911

    申请日:2009-10-07

    IPC分类号: G06F17/30

    CPC分类号: G06F17/30463

    摘要: There is provided a computer-implemented method of optimizing a query. An exemplary method comprises receiving a first query configured to generate a result set. The query may comprise an operation for an outer table, a first predicate, and a second predicate. The second predicate may comprise a subquery correlated to the operation. Additionally, the first predicate and the second predicate may be disjunctive. The exemplary method also comprises generating a first query tree representing the first query, and generating a second query tree representing a second query. The second query may be configured to generate the result set, and may not comprise the subquery. The exemplary method additionally comprises generating a query plan based on the second query tree.

    摘要翻译: 提供了一种优化查询的计算机实现的方法。 一种示例性方法包括接收配置成生成结果集的第一查询。 该查询可以包括外部表,第一谓词和第二谓词的操作。 第二谓词可以包括与该操作相关的子查询。 另外,第一谓词和第二谓词可能是分离的。 该示例性方法还包括生成表示第一查询的第一查询树,以及生成表示第二查询的第二查询树。 可以将第二查询配置为生成结果集,并且可以不包括子查询。 该示例性方法还包括基于第二查询树生成查询计划。

    System and method for performing database operations on a continuous stream of tuples

    公开(公告)号:US06604102B2

    公开(公告)日:2003-08-05

    申请号:US09997823

    申请日:2001-11-29

    IPC分类号: G06F1730

    摘要: The SQL compiler and SQL executor in a database management system are extended to process queries requiring streaming mode processing of data stored in a table. A scan operator performs table access functions during execution of the streaming mode query. The scan operator first performs an initial scan to access rows in a specified database table, and then performs a delta scan to access new rows added to the table, as well as rows modified by other queries. The scan operator continues to process new data added to the table until the initiating user or application closes the associated cursor. A set of data structures are provided to keep track of active scan operators, including a session control block that includes fields for keeping track of whether the scan operator is performing an initial scan or a delta scan. The session control block also includes, for streaming mode scan operators, a delta scan list of new and modified rows to be processed in the delta scan. When a transaction terminates, any streaming mode scan operators whose operation was suspended because of rows locked by the transaction are automatically rescheduled for execution.

    System and method for performing database operations on a continuous stream of tuples
    10.
    发明授权
    System and method for performing database operations on a continuous stream of tuples 有权
    在连续的元组流中执行数据库操作的系统和方法

    公开(公告)号:US06339772B1

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

    申请号:US09347997

    申请日:1999-07-06

    IPC分类号: G06F1730

    摘要: The SQL compiler and SQL executor in a database management system are extended to process queries requiring streaming mode processing of data stored in a table. A scan operator performs table access functions during execution of the streaming mode query. The scan operator first performs an initial scan to access rows in a specified database table, and then performs a delta scan to access new rows added to the table, as well as rows modified by other queries. The scan operator continues to process new data added to the table until the initiating user or application closes the associated cursor. A set of data structures are provided to keep track of active scan operators, including a session control block that includes fields for keeping track of whether the scan operator is performing an initial scan or a delta scan. The session control block also includes, for streaming mode scan operators, a delta scan list of new and modified rows to be processed in the delta scan. When a transaction terminates, any streaming mode scan operators whose operation was suspended because of rows locked by the transaction are automatically rescheduled for execution.

    摘要翻译: 数据库管理系统中的SQL编译器和SQL执行器被扩展到处理需要对存储在表中的数据进行流模式处理的查询。 扫描运算符在执行流模式查询期间执行表访问功能。 扫描操作员首先执行初始扫描以访问指定数据库表中的行,然后执行增量扫描以访问添加到表中的新行以及其他查询修改的行。 扫描运算符继续处理添加到表中的新数据,直到启动用户或应用程序关闭相关联的光标。 提供了一组数据结构来跟踪主动扫描运算符,包括会话控制块,其包括用于跟踪扫描运算符是执行初始扫描还是增量扫描的字段。 对于流模式扫描运算符,会话控制块还包括在delta扫描中要处理的新行和修改行的增量扫描列表。 当事务终止时,由于事务锁定行被暂停运行的任何流模式扫描运算符都将自动重新计划执行。