Method and system for performing query optimization using a hybrid execution plan
    21.
    发明授权
    Method and system for performing query optimization using a hybrid execution plan 有权
    使用混合执行计划执行查询优化的方法和系统

    公开(公告)号:US08903805B2

    公开(公告)日:2014-12-02

    申请号:US12860294

    申请日:2010-08-20

    IPC分类号: G06F17/30

    CPC分类号: G06F17/30469

    摘要: An improved method, system, and computer program product is disclosed that provides a hybrid approach to optimization which allows different subsets of data accessed by a query to be optimized with different access paths and execution approaches. Transformations may be performed to re-write the query, which restructures the query in a way that facilitates the hybrid optimization process. Multiple transformations may be interleaved to produce an efficient re-written query.

    摘要翻译: 公开了一种改进的方法,系统和计算机程序产品,其提供了优化的混合方法,其允许通过不同的访问路径和执行方法来优化由查询访问的不同的数据子集。 可以执行转换以重新编写查询,其以促进混合优化过程的方式重新构建查询。 可以交织多个变换以产生有效的重写查询。

    Delaying evaluation of expensive expressions in a query
    22.
    发明申请
    Delaying evaluation of expensive expressions in a query 有权
    在查询中延迟评估昂贵的表达式

    公开(公告)号:US20070078812A1

    公开(公告)日:2007-04-05

    申请号:US11242361

    申请日:2005-09-30

    IPC分类号: G06F17/30

    摘要: Techniques are provided for delaying evaluation of expensive expressions in a query. Expensive expressions in the query are established by cost information or by looking up a list of known expensive expressions for a match. After an execution plan is determined by using the early evaluation technique, one or more equivalent execution plans is established. The one or more equivalent execution plans may include both a type of execution plans that delay evaluation of expensive expressions and a type of execution plans that do not. In addition, the one or more equivalent execution plans may include both parallelized and non-parallelized alternatives to the execution plan identified by the early evaluation technique. Finally, based on a set of criteria, which may include comparing cost information among all the equivalent execution plans generated thus far, the best execution plan is chosen for the query.

    摘要翻译: 提供了用于延迟查询中昂贵表达式的评估的技术。 查询中的昂贵表达式是通过成本信息建立的,或通过查找匹配的已知昂贵表达式的列表来确定。 在通过使用早期评估技术确定执行计划之后,建立一个或多个等效执行计划。 一个或多个等效执行计划可以包括延迟对昂贵表达式的评估的执行计划的类型以及不执行计划的类型。 此外,一个或多个等效执行计划可以包括由早期评估技术识别的执行计划的并行化和非并行化替代方案。 最后,基于一组标准,其中可能包括比较到目前为止生成的所有等效执行计划中的成本信息,为查询选择最佳执行计划。

    Join factorization of union/union all queries
    23.
    发明申请
    Join factorization of union/union all queries 有权
    加入联盟/联盟所有查询的因式分解

    公开(公告)号:US20070219969A1

    公开(公告)日:2007-09-20

    申请号:US11716010

    申请日:2007-03-08

    IPC分类号: G06F17/30

    摘要: Under a type of query transformation referred to herein as join factorization, the branches of an UNION/UNION ALL query that join a common table are combined to reduce accesses to the common table. The transformation can be expressed as (T1 join T2) union all (T1 join T3)=T1 join (T2 union all T3), where T1, T2 and T3 are three tables. A given query may be rewritten in many alternate ways using join factorization. Evaluating each alternative can be expensive. Therefore, the alternatives are generated and evaluated in a way that minimizes the cost of evaluating the alternatives.

    摘要翻译: 在这里称为连接因式分解的一种类型的查询变换中,加入公共表的UNION / UNION ALL查询的分支被组合以减少对公共表的访问。 转换可以表示为(T1连接T2)联合全部(T1连接T3)= T1连接(T2联合全T3),其中T1,T2和T3是三个表。 给定的查询可以使用连接因式分解以许多替代方式重写。 评估每个替代品可能是昂贵的。 因此,以最小化评估替代品的成本的方式生成和评估替代方案。

    Efficient search space analysis for join factorization
    24.
    发明授权
    Efficient search space analysis for join factorization 有权
    用于连接分解的高效搜索空间分析

    公开(公告)号:US07809713B2

    公开(公告)日:2010-10-05

    申请号:US11716107

    申请日:2007-03-08

    IPC分类号: G06F17/30

    摘要: Under a type of query transformation referred to herein as join factorization, the branches of an UNION/UNION ALL query that join a common table are combined to reduce accesses to the common table. The transformation can be expressed as (T1 join T2) union all (T1 join T3)=T1 join (T2 union all T3), where T1, T2 and T3 are three tables. A given query may be rewritten in many alternate ways using join factorization. Evaluating each alternative can be expensive. Therefore, the alternatives are generated and evaluated in a way that minimizes the cost of evaluating the alternatives.

    摘要翻译: 在这里称为连接因式分解的一种类型的查询变换中,加入公共表的UNION / UNION ALL查询的分支被组合以减少对公共表的访问。 转换可以表示为(T1连接T2)联合全部(T1连接T3)= T1连接(T2联合全T3),其中T1,T2和T3是三个表。 给定的查询可以使用连接因式分解以许多替代方式重写。 评估每个替代品可能是昂贵的。 因此,以最小化评估替代品的成本的方式生成和评估替代方案。

    Approximating a database statistic
    25.
    发明申请
    Approximating a database statistic 有权
    近似数据库统计

    公开(公告)号:US20080120274A1

    公开(公告)日:2008-05-22

    申请号:US11796102

    申请日:2007-04-25

    IPC分类号: G06F7/00

    摘要: A method and apparatus for approximating a database statistic, such as the number of distinct values (NDV) is provided. To approximate the NDV for a portion of a table, a synopsis of distinct values is constructed. Each value in the portion is mapped to a domain of values. The mapping function is implemented with a uniform hash function, in one embodiment. If the resultant domain value does not exist in the synopsis, the domain value is added to the synopsis. If the synopsis reaches its capacity, a portion of the domain values are discarded from the synopsis. The statistic is approximated based on the number (N) of domain values in the synopsis and the portion of the domain that is represented in the synopsis relative to the size of the domain.

    摘要翻译: 提供了用于近似数据库统计量的方法和装置,例如不同值(NDV)的数量。 为了近似表的一部分的NDV,构建了不同值的概要。 该部分中的每个值都映射到值的域。 在一个实施例中,映射功能是用均匀散列函数实现的。 如果在概要中不存在结果域值,则将域值添加到概要中。 如果概要达到其容量,则域值的一部分将从摘要中被丢弃。 统计量基于概要中的域值的数量(N)和在概要中相对于域的大小表示的域的部分近似。

    Efficient search space analysis for join factorization
    26.
    发明申请
    Efficient search space analysis for join factorization 有权
    用于连接分解的高效搜索空间分析

    公开(公告)号:US20070219977A1

    公开(公告)日:2007-09-20

    申请号:US11716107

    申请日:2007-03-08

    IPC分类号: G06F17/30

    摘要: Under a type of query transformation referred to herein as join factorization, the branches of an UNION/UNION ALL query that join a common table are combined to reduce accesses to the common table. The transformation can be expressed as (T1 join T2) union all (T1 join T3)=T1 join (T2 union all T3), where T1, T2 and T3 are three tables. A given query may be rewritten in many alternate ways using join factorization. Evaluating each alternative can be expensive. Therefore, the alternatives are generated and evaluated in a way that minimizes the cost of evaluating the alternatives.

    摘要翻译: 在这里称为连接因式分解的一种类型的查询变换中,加入公共表的UNION / UNION ALL查询的分支被组合以减少对公共表的访问。 转换可以表示为(T 1连接T 2)联合全部(T 1连接T 3)= T 1连接(T 2并联全部T 3),其中T 1,T 2和T 3是三个表。 给定的查询可以使用连接因式分解以许多替代方式重写。 评估每个替代品可能是昂贵的。 因此,以最小化评估替代品的成本的方式生成和评估替代方案。

    Join factorization of union/union all queries
    27.
    发明授权
    Join factorization of union/union all queries 有权
    加入联盟/联盟所有查询的因式分解

    公开(公告)号:US07644062B2

    公开(公告)日:2010-01-05

    申请号:US11716010

    申请日:2007-03-08

    IPC分类号: G06F7/00 G06F17/30

    摘要: Under a type of query transformation referred to herein as join factorization, the branches of an UNION/UNION ALL query that join a common table are combined to reduce accesses to the common table. The transformation can be expressed as (T1 join T2) union all (T1 join T3)=T1 join (T2 union all T3), where T1, T2 and T3 are three tables. A given query may be rewritten in many alternate ways using join factorization. Evaluating each alternative can be expensive. Therefore, the alternatives are generated and evaluated in a way that minimizes the cost of evaluating the alternatives.

    摘要翻译: 在这里称为连接因式分解的一种类型的查询变换中,加入公共表的UNION / UNION ALL查询的分支被组合以减少对公共表的访问。 转换可以表示为(T1连接T2)联合全部(T1连接T3)= T1连接(T2联合全T3),其中T1,T2和T3是三个表。 给定的查询可以使用连接因式分解以许多替代方式重写。 评估每个替代品可能是昂贵的。 因此,以最小化评估替代品的成本的方式生成和评估替代方案。

    Merging synopses to determine number of distinct values in large databases
    28.
    发明授权
    Merging synopses to determine number of distinct values in large databases 有权
    合并摘要以确定大型数据库中不同值的数量

    公开(公告)号:US07603339B2

    公开(公告)日:2009-10-13

    申请号:US11796110

    申请日:2007-04-25

    IPC分类号: G06F7/00 G06F17/30 G06F17/00

    摘要: A method and apparatus for merging synopses to determine a database statistic, e.g., a number of distinct values (NDV), is disclosed. The merging can be used to determine an initial database statistic or to perform incremental statistics maintenance. For example, each synopsis can pertain to a different partition, such that merging the synopses generates a global statistic. When performing incremental maintenance, only those synopses whose partitions have changed need to be updated. Each synopsis contains domain values that summarize the statistic. However, the synopses may initially contain domain values that are not compatible with each other. Prior to merging the synopses the domain values in each synopsis is made compatible with the domain values in the other synopses. The adjustment is made such that each synopsis represents the same range of domain values, in one embodiment. After “compatible synopses” are formed, the synopses are merged by taking the union of the compatible synopses.

    摘要翻译: 公开了用于合并概要以确定数据库统计量的方法和装置,例如多个不同值(NDV)。 合并可用于确定初始数据库统计信息或执行增量统计维护。 例如,每个概要可以涉及不同的分区,以便合并概要会生成全局统计量。 执行增量维护时,只需要更新其分区已更改的概要文件。 每个概要包含总结统计量的域值。 但是,这些概要可能最初包含彼此不兼容的域值。 在合并概要之前,每个概要中的域值与其他概要中的域值兼容。 在一个实施例中进行调整,使得每个概要表示相同范围的域值。 在形成“兼容简介”之后,通过兼容兼容简报的合并来合并概要。

    Approximating a database statistic
    29.
    发明授权
    Approximating a database statistic 有权
    近似数据库统计

    公开(公告)号:US07636731B2

    公开(公告)日:2009-12-22

    申请号:US11796102

    申请日:2007-04-25

    IPC分类号: G06F7/00 G06F17/30 G06F17/00

    摘要: A method and apparatus for approximating a database statistic, such as the number of distinct values (NDV) is provided. To approximate the NDV for a portion of a table, a synopsis of distinct values is constructed. Each value in the portion is mapped to a domain of values. The mapping function is implemented with a uniform hash function, in one embodiment. If the resultant domain value does not exist in the synopsis, the domain value is added to the synopsis. If the synopsis reaches its capacity, a portion of the domain values are discarded from the synopsis. The statistic is approximated based on the number (N) of domain values in the synopsis and the portion of the domain that is represented in the synopsis relative to the size of the domain.

    摘要翻译: 提供了用于近似数据库统计量的方法和装置,例如不同值(NDV)的数量。 为了近似表的一部分的NDV,构建了不同值的概要。 该部分中的每个值都映射到值的域。 在一个实施例中,映射功能是用均匀散列函数实现的。 如果在概要中不存在结果域值,则将域值添加到概要中。 如果概要达到其容量,则域值的一部分将从摘要中被丢弃。 统计量基于概要中的域值的数量(N)和在概要中相对于域的大小表示的域的部分近似。

    Merging synopses to determine number of distinct values in large databases
    30.
    发明申请
    Merging synopses to determine number of distinct values in large databases 有权
    合并摘要以确定大型数据库中不同值的数量

    公开(公告)号:US20080120275A1

    公开(公告)日:2008-05-22

    申请号:US11796110

    申请日:2007-04-25

    IPC分类号: G06F17/30

    摘要: A method and apparatus for merging synopses to determine a database statistic, e.g., a number of distinct values (NDV), is disclosed. The merging can be used to determine an initial database statistic or to perform incremental statistics maintenance. For example, each synopsis can pertain to a different partition, such that merging the synopses generates a global statistic. When performing incremental maintenance, only those synopses whose partitions have changed need to be updated. Each synopsis contains domain values that summarize the statistic. However, the synopses may initially contain domain values that are not compatible with each other. Prior to merging the synopses the domain values in each synopsis is made compatible with the domain values in the other synopses. The adjustment is made such that each synopsis represents the same range of domain values, in one embodiment. After “compatible synopses” are formed, the synopses are merged by taking the union of the compatible synopses.

    摘要翻译: 公开了用于合并概要以确定数据库统计量的方法和装置,例如多个不同值(NDV)。 合并可用于确定初始数据库统计信息或执行增量统计维护。 例如,每个概要可以涉及不同的分区,以便合并概要会生成全局统计量。 执行增量维护时,只需要更新其分区已更改的概要文件。 每个概要包含总结统计量的域值。 但是,这些概要可能最初包含彼此不兼容的域值。 在合并概要之前,每个概要中的域值与其他概要中的域值兼容。 在一个实施例中进行调整,使得每个概要表示相同范围的域值。 在形成“兼容简介”之后,通过兼容兼容简报的合并来合并概要。