Optimal ranges for relational query execution plans

US11080276B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11080276-B2
Application numberUS-201815904192-A
CountryUS
Kind codeB2
Filing dateFeb 23, 2018
Priority dateFeb 23, 2018
Publication dateAug 3, 2021
Grant dateAug 3, 2021

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.

In some implementations, there is provided an apparatus having at least one data processor and at least one memory storing instructions which, when executed by the at least one data processor, cause executing at least a portion of a query execution plan; determining, at an edge including an intermediate result, a cardinality; proceeding with the execution of the query execution plan, when the determined cardinality is within an optimality range associated with the edge; and selecting an alternative query execution plan for execution, when the determined cardinality is outside the optimality range associated with the edge. Related systems and articles of manufacture are also provided.

First claim

Opening claim text (preview).

What is claimed is: 1. An apparatus, comprising: at least one data processor; and at least one memory storing instructions which, when executed by the at least one data processor, cause operations comprising: executing at least a portion of a query execution plan including an edge node, a first node providing a first input to the edge node, and a second node providing a second input to the edge node, the executing providing, at the edge node, an intermediate result based on the first input provided by the first node and the second input provided by the second node; determining a cardinality for the intermediate result at the edge node, rather than determining cardinalities for the first node and the second node; proceeding with the execution of the query execution plan, when the determined cardinality is within an optimality range associated with the edge node including the intermediate result; and selecting an alternative query execution plan for execution, when the determined cardinality is outside the optimality range associated with the edge node including the intermediate result. 2. The apparatus of claim 1 further comprising: receiving, at a query optimizer, a query from an application; and determining, at the query optimizer, the query execution plan for execution at a database. 3. The apparatus of claim 1 further comprising: estimating, before the executing, the optimality range associated with the edge node. 4. The apparatus of claim 3 , wherein the optimality range includes a lower cardinality bound and a higher cardinality bound, wherein the lower cardinality bound and the higher cardinality bound form a range, within which query execution plan remains optimal. 5. The apparatus of claim 4 , wherein the lower cardinality bound is mapped to a first alternative query execution plan and the higher cardinality bound is mapped to the second alternative query execution plan, and wherein when the determined cardinality is less than the lower cardinality bound, the query optimizer selects the first alternative query execution plan for execution as an optimal plan, and wherein when the determined cardinality is higher than the higher cardinality bound, the query optimizer selects the second alternative query execution plan for execution as the optimal plan. 6. The apparatus of claim 1 , wherein the determined cardinality represents the actual cardinality obtained from execution of at least the edge node that provides the intermediate result, and wherein the optimality range is determined based on a parametric cost function. 7. The apparatus of claim 1 , wherein the optimality range and the alternative query execution plan are cached in a table, wherein the determining further comprising calculating a plurality of query execution plans, and wherein a plurality of optimality ranges are determined for a corresponding plurality of edge nodes of the query execution plan. 8. A method comprising: executing at least a portion of a query execution plan including an edge node, a first node providing a first input to the edge node, and a second node providing a second input to the edge node, the executing providing, at the edge node, an intermediate result based on the first input provided by the first node and the second input provided by the second node; determining a cardinality for the intermediate result at the edge node, rather than determining cardinalities for the first node and the second node; proceeding with the execution of the query execution plan, when the determined cardinality is within an optimality range associated with the edge node including the intermediate result; and selecting an alternative query execution plan for execution, when the determined cardinality is outside the optimality range associated with the edge node including the intermediate result. 9. The method of claim 8 further comprising: receiving, at a query optimizer, a query from an application; and determining, at the query optimizer, the query execution plan for execution at a database. 10. The method of claim 8 further comprising: estimating, before the executing, the optimality range associated with the edge node. 11. The method of claim 10 , wherein the optimality range includes a lower cardinality bound and a higher cardinality bound, wherein the lower cardinality bound and the higher cardinality bound form a range, within which query execution plan remains optimal. 12. The method of claim 11 , wherein the lower cardinality bound is mapped to a first alternative query execution plan and the higher cardinality bound is mapped to the second alternative query execution plan, and wherein when the determined cardinality is less than the lower cardinality bound, the query optimizer selects the first alternative query execution plan for execution as an optimal plan, and wherein when the determined cardinality is higher than the higher cardinality bound, the query optimizer selects the second alternative query execution plan for execution as the optimal plan. 13. The method of claim 8 , wherein the determined cardinality represents the actual cardinality obtained from execution of at least the edge node that provides the intermediate result, and wherein the optimality range is determined based on a parametric cost function. 14. The method of claim 8 , wherein the optimality range and the alternative query execution plan are cached in a table, wherein the determining further comprising calculating a plurality of query execution plans, and wherein a plurality of optimality ranges are determined for a corresponding plurality of edge nodes of the query execution plan. 15. A non-transitory computer-readable storage medium including program code which, when executed by the at least one data processor, cause operations comprising: executing at least a portion of a query execution plan including an edge node, a first node providing a first input to the edge node, and a second node providing a second input to the edge node, the executing providing, at the edge node, an intermediate result based on the first input provided by the first node and the second input provided by the second node; determining a cardinality for the intermediate result at the edge node, rather than determining cardinalities for the first node and the second node; proceeding with the execution of the query execution plan, when the determined cardinality is within an optimality range associated with the edge node including the intermediate result; and selecting an alternative query execution plan for execution, when the determined cardinality is outside the optimality range associated with the edge node including the intermediate result. 16. The non-transitory computer-readable storage medium of claim 15 further causing operations comprising: receiving, at a query optimizer, a query from an application; and determining, at the query optimizer, the query execution plan for execution at a database. 17. The non-transitory computer-readable storage medium of claim 15 further causing operations comprising: estimating, before the executing, the optimality range associated with the edge node. 18. The non-transitory computer-readable storage medium of claim 17 , wherein the optimality range includes a lower cardinality bound and a higher cardinality bound, wherein the lower cardinality bound and the higher cardinality bound form a range, within which query execution plan remains optimal. 19. The non-transitory computer-readable storage medium of claim 18 , wherein the lower car

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 US11080276B2 cover?
In some implementations, there is provided an apparatus having at least one data processor and at least one memory storing instructions which, when executed by the at least one data processor, cause executing at least a portion of a query execution plan; determining, at an edge including an intermediate result, a cardinality; proceeding with the execution of the query execution plan, when the d…
Who is the assignee on this patent?
Sap Se
What technology area does this patent fall under?
Primary CPC classification G06F16/24549. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Aug 03 2021 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 3 related publications on this page (citations in our corpus or others sharing the same primary CPC).