Driving massive scale out through rewrites of analytical functions

US11455303B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11455303-B2
Application numberUS-201916516898-A
CountryUS
Kind codeB2
Filing dateJul 19, 2019
Priority dateJul 19, 2019
Publication dateSep 27, 2022
Grant dateSep 27, 2022

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

According to an embodiment, a method includes rewriting a particular query to generate a rewritten query. The particular query specifies a window function operator, a particular input to the window function operator, and an analytical function. Rewriting the particular query includes assigning the particular input to an intermediate relation and replacing the window function operator with a replacement operator. The method further includes assigning to the replacement operator an aggregate function corresponding to the analytical function, and the intermediate relation. In this embodiment, the method also includes placing a join operator that joins the intermediate relation with an output of the replacement operator.

First claim

Opening claim text (preview).

What is claimed is: 1. A method, comprising: a DBMS (database management system) rewriting a particular query to generate a rewritten query, wherein the particular query specifies a window function operator, a particular input to the window function operator, one or more PARTITION BY attributes, and an analytical function, wherein rewriting the particular query includes: assigning the particular input to an intermediate relation; replacing the window function operator with a GROUP BY operator, and assigning to the GROUP BY operator: the one or more PARTITION BY attributes as grouping attributes, an aggregate function corresponding to the analytical function, and the intermediate relation; placing a join operator that joins the intermediate relation with an output of the GROUP BY operator, wherein the join operator includes the one or more PARTITION BY attributes as one or more join attributes; and said DBMS executing said rewritten query. 2. The method of claim 1 , wherein rewriting the particular query is performed in response to determining that the window function operator satisfies criteria, wherein the criteria include that the window function operator applies no framing, has no ORDER BY clause, and includes a PARTITION BY clause. 3. The method of claim 1 , wherein the one or more join attributes are constructed by matching each of the one or more PARTITION BY attributes between the intermediate relation and the GROUP BY operator. 4. The method of claim 1 , wherein the one or more join attributes are constructed by matching each of the one or more PARTITION BY attributes between the intermediate relation and the GROUP BY operator, and concatenating each of a plurality of join attributes together. 5. The method of claim 1 , wherein the GROUP BY operator and the join operator share the intermediate relation as an input. 6. The method of claim 1 , wherein the intermediate relation is materialized as a temporary result, and the GROUP BY operator and the join operator, when executed, read from the temporary result. 7. The method of claim 1 , further comprising executing the rewritten query on a dataset to obtain a result. 8. A method, comprising: a DBMS (database management system) rewriting a particular query to generate a rewritten query, wherein the particular query specifies a window function operator, a particular input to the window function operator, and an analytical function, wherein rewriting the particular query includes: assigning the particular input to an intermediate relation; replacing the window function operator with a pure aggregation operator and assigning to the pure aggregation operator: an aggregate function corresponding to the analytical function, and the intermediate relation; placing a Cartesian product operator that operates on the intermediate relation and on an output of the pure aggregation operator; and said DBMS executing said rewritten query. 9. The method of claim 8 , wherein rewriting the particular query is performed in response to determining that the window function operator satisfies criteria, wherein the criteria include that the window function operator applies no framing, has no ORDER BY clause, and no PARTITION BY clause. 10. The method of claim 8 , wherein rewriting the particular query is performed in response to determining that the window function operator satisfies criteria, wherein the criteria include that the window function operator applies no framing, has no ORDER BY clause, and an empty OVER clause. 11. The method of claim 8 , wherein the Cartesian product operator is a join operator with empty join attributes. 12. The method of claim 8 , wherein the pure aggregation operator is a GROUP BY operator with a single grouping. 13. The method of claim 8 , wherein the pure aggregation operator and the Cartesian product operator share the intermediate relation as an input. 14. The method of claim 8 , wherein the intermediate relation is materialized as a temporary result, and the pure aggregation operator and the Cartesian product operator, when executed, read from the temporary result. 15. The method of claim 8 , further comprising executing the rewritten query on a dataset to obtain a result. 16. One or more non-transitory computer-readable storage medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform functions comprising: a DBMS (database management system) rewriting a particular query to generate a rewritten query, wherein the particular query specifies a window function operator, a particular input to the window function operator, and an analytical function, wherein rewriting the particular query includes: assigning the particular input to an intermediate relation; replacing the window function operator with a replacement operator, and assigning to the replacement operator: an aggregate function corresponding to the analytical function, and the intermediate relation; placing a join operator that joins the intermediate relation with an output of the replacement operator; said DBMS executing said rewritten query. 17. The one or more non-transitory computer-readable storage medium of claim 16 , wherein rewriting the particular query is performed in response to determining that the window function operator satisfies criteria, wherein the criteria include that the window function operator applies no framing, has no ORDER BY clause, and includes one or more PARTITION BY attributes. 18. The one or more non-transitory computer-readable storage medium of claim 17 , wherein the replacement operator is a GROUP BY operator, and replacing the window function operator with the replacement operator further includes assigning to the GROUP BY operator the one or more PARTITION BY attributes as grouping attributes; and wherein the join operator includes the one or more PARTITION BY attributes as one or more join attributes. 19. The one or more non-transitory computer-readable storage medium of claim 16 , wherein rewriting the particular query is performed in response to determining that the window function operator satisfies criteria, wherein the criteria include that the window function operator applies no framing, has no ORDER BY clause, and no PARTITION BY clause. 20. The one or more non-transitory computer-readable storage medium of claim 19 , wherein the replacement operator is a pure aggregation operator and the join operator is a Cartesian product operator. 21. A method, comprising: a DBMS (database management system) rewriting a particular query to generate a rewritten query, wherein the particular query specifies a window function operator, a particular input to the window function operator, and an analytical function, wherein rewriting the particular query includes: assigning the particular input to an intermediate relation; replacing the window function operator with a replacement operator, and assigning to the replacement operator: an aggregate function corresponding to the analytical function, and the intermediate relation; placing a join operator that joins the intermediate relation with an output of the replacement operator; said DBMS executing said rewritten query. 22. The method of claim 21 , wherein rewriting the particular query is performed in response to determining that the window function operator satisfies criteria, wherein the criteria include that the window function operator applies no framing, has no ORDER BY c

Assignees

Inventors

Classifications

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11455303B2 cover?
According to an embodiment, a method includes rewriting a particular query to generate a rewritten query. The particular query specifies a window function operator, a particular input to the window function operator, and an analytical function. Rewriting the particular query includes assigning the particular input to an intermediate relation and replacing the window function operator with a rep…
Who is the assignee on this patent?
Oracle Int Corp
What technology area does this patent fall under?
Primary CPC classification G06F16/24535. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Sep 27 2022 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 2 related publications on this page (citations in our corpus or others sharing the same primary CPC).