Multi-table aggregation through partial-group-by processing

    公开(公告)号:US11086870B1

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

    申请号:US14985117

    申请日:2015-12-30

    申请人: Teradata US, Inc.

    摘要: A data store system includes an array of persistent storage devices configured to store a plurality of data store tables. The data store system includes a processor in communication with the storage device. The processor may receive a query comprising an aggregate function and identify structure of an argument of the aggregate function. The subset of data store tables may be associated with the argument. The processor may partially-execute the aggregate function on each data store table in the subset involved in the argument of the aggregate function to create partially-executed results for each data store table of the subset of data store tables. The processor may join the partially-executed results based on join conditions contained in the aggregate function. The processor may complete execution of the aggregate function on the partially-executed results to generate a final result of the aggregate function. A method and computer-readable medium are also disclosed.

    Cost-based semi-join rewrite
    3.
    发明授权

    公开(公告)号:US12105708B2

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

    申请号:US17566442

    申请日:2021-12-30

    申请人: Teradata US, Inc

    IPC分类号: G06F16/23 G06F16/2453

    CPC分类号: G06F16/24544 G06F16/24545

    摘要: A method, apparatus, and computer program product for executing a relational database management system (RDBMS) in a computer system, wherein the RDBMS manages a relational database comprised of one or more tables storing data. The RDBMS executes a query with a semi-join operation comprising an inclusion join and/or an exclusion join performed against at least an outer table and an inner table, wherein the inclusion join returns a row from the outer table when there is a match with a row in the inner table, and the exclusion join returns a row from the outer table when there is no match with a row in the inner table. The RDBMS performs a rewrite of the query to avoid spooling and/or sorting of the inner table, when the inner table is larger than the outer table and a cost after the rewrite is lower than before the rewrite.

    QUERY EXPRESSION RESULT CACHING USING DYNAMIC JOIN INDEX

    公开(公告)号:US20240220501A1

    公开(公告)日:2024-07-04

    申请号:US18089833

    申请日:2022-12-28

    申请人: Teradata US, Inc.

    摘要: An apparatus, method and computer program product for query optimization in a Relational Database Management System (RDBMS), wherein an optimizer accesses a query expression repository (QER) storing planning and execution information for QEs from previous queries, wherein the QEs comprise table relations, intermediate results and/or final results of operations in the previous queries. Additionally, dynamic join indexes representing QE results are created for high-value QEs selected from the QER and maintained within a DJI repository. During query plan creation for a current or subsequent query, the optimizer searches the QER and DJI repository for DJIs created for high-value QEs corresponding to QEs contained in the current or subsequent query. DJIs corresponding to the matching QEs are used in the query planning phase to rewrite the current or subsequent user query so that stored QE results are used to answer QEs contained in the current or subsequent query.

    COST-BASED SEMI-JOIN REWRITE
    8.
    发明公开

    公开(公告)号:US20230214390A1

    公开(公告)日:2023-07-06

    申请号:US17566442

    申请日:2021-12-30

    申请人: Teradata US, Inc

    IPC分类号: G06F16/2453

    CPC分类号: G06F16/24544 G06F16/24545

    摘要: A method, apparatus, and computer program product for executing a relational database management system (RDBMS) in a computer system, wherein the RDBMS manages a relational database comprised of one or more tables storing data. The RDBMS executes a query with a semi-join operation comprising an inclusion join and/or an exclusion join performed against at least an outer table and an inner table, wherein the inclusion join returns a row from the outer table when there is a match with a row in the inner table, and the exclusion join returns a row from the outer table when there is no match with a row in the inner table. The RDBMS performs a rewrite of the query to avoid spooling and/or sorting of the inner table, when the inner table is larger than the outer table and a cost after the rewrite is lower than before the rewrite.