hottub.patents
US 12,717,784 B2#3155991 Most CitedActiveUnited States (USPTO)Utility

Query expression repository

0Forward Citations (#3155991 Global)
0.0/yrCitation Velocity (#3155991 Global)
0.00Citation PageRank (#3155991 Global)
16Prior Art Cited
17Claims (3 Indep. · 14 Dep.)
8Drawings / Sheets

Abstract

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), so that the optimizer learns from previous versions of the queries to improve current and subsequent versions of the queries. The QER stores planning and execution information for QEs from the previous versions of the queries, wherein the QEs comprise table relations, intermediate results and/or final results of operations in the previous versions of the queries. The optimizer searches the QER for QEs from the query execution plans, and uses information from the QEs stored in the QER when optimizing the current and subsequent versions of the queries. The optimizer may also reuses results from the QEs stored in the QER.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 16 · Forward citations: 0.

Claims (17 — 3 Independent, 14 Dependent)

  1. Claim 1Independent Claim

    A computer-implemented apparatus, comprising: (a) a relational database management system (RDBMS) executing in a computer system, wherein the RDBMS manages a relational database comprised of one or more tables storing data; and (b) the RDBMS interpreting a current query comprised of a plurality of query expressions to generate one or more query execution plans for execution by the RDBMS, wherein each of the query expressions comprises a logical operations and one or more source identifiers, projections, and conditions associated with the logical operation; (c) an optimizer of the RDBMS enables inter-query learning at a query expression level by: the RDBMS storing each of the query expressions and their associated query execution plans from previous queries as uniquely identified in a query expression repository (QER), wherein the query expressions are represented as query expression trees stored in a bottom-up order, and any node in the query expression trees is comprised of the logical operations rooted at the node; the RDBMS searching the QER for each of the query expressions found in the current query, wherein the searching is based on the logical operation, the source identifiers, projections, and conditions of the query expressions from the previous queries stored in the QER, and the RDBMS using the query execution plans stored with the query expressions and their associated query expression trees found in the QER to generate the query execution plans for each of the query expressions found in the current query, so that the optimizer of the RDBMS learns from the previous queries to improve the current query.

  2. Claim 2Depends on #1

    The apparatus of claim 1, wherein the optimizer reuses results from the query expressions stored in the query expression repository.

  3. Claim 3Depends on #2

    The apparatus of claim 2, wherein the results comprise table relations, intermediate results or final results of the query expressions.

  4. Claim 4Depends on #1

    The apparatus of claim 1, wherein each of the query expressions are stored in the query expression repository with a query expression identifier; the logical operation performed; one or more of the source identifiers associated with the logical operation; and operation-specific information including frequency of use, the projections and the conditions.

  5. Claim 5Depends on #1

    The apparatus of claim 1, wherein the query expressions are stored in the query expression repository in an order that the optimizer plans the query expressions.

  6. Claim 6Depends on #1

    The apparatus of claim 1, wherein the query expression repository is managed by a query expression repository manager that uniquely identifies each of the query expressions in the query expression repository and increments a frequency for each of the query expressions based on how often each of the query expressions is referenced in the previous, current and subsequent versions of the queries.

  7. Claim 7Independent Claim

    A computer-implemented method, comprising: (a) 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; (b) the RDBMS interpreting a current query comprised of a plurality of query expressions to generate one or more query execution plans for execution by the RDBMS, wherein each of the query expressions comprises a logical operation and one or more source identifiers, projections, and conditions associated with the logical operation; (c) an optimizer of the RDBMS enables inter-query learning at a query expression level by: the RDBMS storing each of the query expressions and their associated query execution plans from previous queries as uniquely identified in a query expression repository (QER), wherein the query expressions are represented as query expression trees stored in a bottom-up order, and any node in the query expression trees is comprised of the logical operations rooted at the node; the RDBMS searching the QER for each of the query expressions found in the current query, wherein the searching is based on the logical operation, the source identifiers, projections, and conditions of the query expressions from the previous queries stored in the QER, and the RDBMS using the query execution plans stored with the query expressions and their associated query expression trees found in the QER to generate the query execution plans for each of the query expressions found in the current query, so that the optimizer of the RDBMS learns from the previous queries to improve the current query.

  8. Claim 8Depends on #7

    The method of claim 7, wherein the optimizer reuses results from the query expressions stored in the query expression repository.

  9. Claim 9Depends on #8

    The method of claim 8, wherein the results comprise table relations, intermediate results or final results of the query expressions.

  10. Claim 10Depends on #7

    The method of claim 7, wherein each of the query expressions are stored in the query expression repository with a query expression identifier; the logical operation performed; one or more of the source identifiers associated with the logical operation; and operation-specific information including frequency of use, the projections and the conditions.

  11. Claim 11Depends on #7

    The method of claim 7, wherein the query expressions are stored in the query expression repository in an order that the optimizer plans the query expressions.

  12. Claim 12Depends on #7

    The method of claim 7, wherein the query expression repository is managed by a query expression repository manager that uniquely identifies each of the query expressions in the query expression repository and increments a frequency for each of the query expressions based on how often each of the query expressions is referenced in the previous, current and subsequent versions of the queries.

  13. Claim 13Independent Claim

    A computer program product, the computer program product comprising a non-transitory computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computer system to cause the computer system to perform a method, comprising: (a) 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; (b) the RDBMS interpreting a current query comprised of a plurality of query expressions to generate one or more query execution plans for execution by the RDBMS, wherein each of the query expressions comprise a logical operation and one or more source identifiers, projections, and conditions associated with the logical operation; (c) an optimizer of the RDBMS enables inter-query learning at a query expression level by: the RDBMS storing each of the query expressions and their associated query execution from previous queries as uniquely identified in a query expression repository (QER), wherein the query expressions are represented as query expression trees stored in a bottom-up order, and any node in the query expression trees is comprised of the logical operations rooted at the node; the RDBMS searching the QER for each of the query expressions found in the current query, wherein the searching is based on the logical operation, the source identifiers, projections, and conditions of the query expressions from the previous queries stored in the QER, and the RDBMS using the query execution plans stored with the query expressions and their associated query expression trees found in the QER to generate the query execution plans for each of the query expressions found in the current query, so that the optimizer of the RDBMS learns from the previous queries to improve the current query.

  14. Claim 14Depends on #13

    The computer program product of claim 13, wherein the optimizer reuses results from the query expressions stored in the query expression repository and the results comprise table relations, intermediate results or final results of the query expressions.

  15. Claim 15Depends on #13

    The computer program product of claim 13, wherein each of the query expressions are stored in the query expression repository with a query expression identifier; the logical operation performed; one or more of the source identifiers associated with the logical operation; and operation-specific information including frequency of use, the projections and the conditions.

  16. Claim 16Depends on #13

    The computer program product of claim 13, wherein the query expressions are stored in the query expression repository in an order that the optimizer plans the query expressions.

  17. Claim 17Depends on #13

    The computer program product of claim 13, wherein the query expression repository is managed by a query expression repository manager that uniquely identifies each of the query expressions in the query expression repository and increments a frequency for each of the query expressions based on how often each of the query expressions is referenced in the previous, current and subsequent versions of the queries.

Technical Overview & Description

CROSS REFERENCE TO RELATED APPLICATIONS This application is related to the following co-pending and commonly-assigned application: U.S. Provisional Patent Application Ser. No. 62/888,761, filed on Aug. 19, 2019, by Grace Kwan-On Au, Nobul Reddy Goli, Vivek Kumar, Ming Zhang, Bin Cao, Sanjay Nair, Kanaka Durga Rajanala, Sanjib Mishra, Naveen Jaiswal, Lu Ma and Xiaorong Luo, and entitled “ QUERY EXPRESSION REPOSITORY, ” ; which application is incorporated by reference herein. BACKGROUND OF THE INVENTION 1. Field of the Invention This invention relates to methods and techniques for query optimization in relational database management systems. 2. Description of Related Art Computer systems implementing a Relational DataBase Management System (RDBMS) using Structured Query Language (SQL) statements are well known in the art. In a relational database, data is stored into tables, wherein the tables are at least two dimensional, consisting of rows and columns. SQL statements may be formulated as queries, among other operations, to select rows of the tables by specifying one or more query expressions (QEs) that perform logical operations on the data in one or more of the columns. A number of optimization techniques have been developed for minimizing the time required to perform these logical operations. However, there is still a need in the art for additional optimization techniques. The present invention satisfies this need. SUMMARY OF THE INVENTION One or more embodiments of the invention provides an apparatus, method and computer program product for query optimization in an RDBMS, wherein an optimizer accesses a query expression repository (QER), so that the optimizer learns from previous versions of the queries to improve current and subsequent versions of the queries. The QER stores planning and execution information for QEs from the previous versions of the queries, wherein the QEs comprise table relations, intermediate results and/or final results of operations. The o

Cited By — Indexed Forward Citations (0 of 0 total)

No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.

References Cited — Backward Prior Art (16)

PatentTitleYearCitations