Mechanism for optimizing parallel execution of queries on symmetric resources

US10019478B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10019478-B2
Application numberUS-201414477296-A
CountryUS
Kind codeB2
Filing dateSep 4, 2014
Priority dateSep 5, 2013
Publication dateJul 10, 2018
Grant dateJul 10, 2018

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.

A method that comprises receiving a logical execution plan for a database query corresponding to a plurality of tables of the database, wherein the logical execution plan comprises one or more operators, receiving an operator cost for each of the operators in the logical execution plan, computing a first accumulated processing cost for a first of the tables based on the logical execution plan, operator selectivity, and operator costs corresponding to the first table, computing a second accumulated processing cost for a second of the tables based on the logical execution plan, operator selectivity, and operator costs corresponding to the second table, comparing the first accumulated processing cost and the second accumulated processing cost to determine a table with the highest accumulated processing cost, and responsive to comparing the accumulated processing costs, computing a physical execution plan that requires partitioning the table with the highest accumulated processing cost.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: receiving a logical execution plan for a database query corresponding to a plurality of tables of a database, wherein the logical execution plan comprises one or more operators; receiving an operator cost for each of the operators in the logical execution plan; computing a first accumulated processing cost for a first of the tables based on the logical execution plan and operator costs corresponding to the first table; computing a second accumulated processing cost for a second of the tables based on the logical execution plan and operator costs corresponding to the second table; comparing the first accumulated processing cost and the second accumulated processing cost to determine a table with a highest accumulated processing cost; and responsive to comparing the accumulated processing costs, computing a physical execution plan that requires partitioning the table with the highest accumulated processing cost. 2. The method of claim 1 , further comprising partitioning the table with the highest accumulated processing cost into a plurality of pieces. 3. The method of claim 2 , wherein the table with the highest accumulated processing cost is partitioned into a number of pieces equal to a number of available symmetric computing resources. 4. The method of claim 3 , further comprising partitioning the table with less than the highest accumulated processing cost into fewer pieces than the number of pieces into which the table with the highest accumulated processing cost is partitioned. 5. The method of claim 3 , wherein partitioning is performed according to a cost-based piece-partitioning scheme for determining an accumulated processing cost for each table. 6. The method of claim 5 , wherein the cost-based piece-partitioning scheme comprises a product of a number of records stored in the table multiplied by a sum of the operator costs corresponding with the table and multiplied by an accumulated effective selectivity value corresponding to the table. 7. The method of claim 1 , wherein the operator cost comprises an amount of computing resources required to perform a database table operation associated with the operator. 8. The method of claim 1 , wherein the physical execution plan describes a plan for performing operations of the database query in parallel. 9. A method comprising: receiving instructions for querying data in a database comprising a plurality of tables; receiving an accumulated operator selectivity related to a first table by execution of the instructions; computing a first accumulated processing cost for the first table based on the operator selectivity of the first table; receiving an accumulated operator selectivity related to a second table by execution of the instructions; computing a second accumulated processing cost for the second table based on the operator selectivity of the second table; comparing the first accumulated processing cost and the second accumulated processing cost; and selecting a table for partitioning in response to the comparison such that the table selected for partitioning has a highest accumulated processing cost. 10. The method of claim 9 , further comprising partitioning the table with the highest accumulated processing cost into a plurality of pieces. 11. The method of claim 10 , wherein the table with the highest accumulated processing cost is partitioned into a number of pieces equal to a number of available symmetric computing resources. 12. The method of claim 9 , further comprising asymmetrically partitioning the table with less than the highest accumulated processing cost into a plurality of pieces according to a cost differential between tables. 13. The method of claim 11 , further comprising determining physical instructions for querying the database, wherein the instructions indicate operations to be performed in parallel on the plurality of pieces of the table with the highest accumulated processing cost. 14. The method of claim 9 , wherein the instructions contain a first operator and a second operator, and wherein the accumulated operator selectivity comprises a probability of a record being found in the first or second table of the database by the first operator prior to execution of the second operator. 15. The method of claim 9 , wherein the accumulated processing cost for the first or second table comprises a product of a number of records stored in the table multiplied by a sum of the operator costs corresponding with the table and multiplied by the accumulated operator selectivity corresponding to the table. 16. An apparatus comprising: a port configured to receive: a query tree associated with a query to be performed on a plurality of database tables by a plurality of threads; a number of records stored in each table; a plurality of operator costs, each corresponding to an operator identified by the query tree and one of the tables; and a plurality of accumulated effective selectivity values, each corresponding to one of the operators identified by the query tree and one of the tables; and a processor coupled to the port and configured to: compute an accumulated processing cost for each table comprising a product of a number of records stored in the table multiplied by a sum of the operator costs corresponding with the table and multiplied by the accumulated effective selectivity value corresponding to the table; and compute a query execution plan for the query in response to a comparison that comprises instructions for partitioning one of the database tables with a highest accumulated processing cost. 17. The apparatus of claim 16 , wherein the query tree contains a first operator and a second operator, and wherein the accumulated operator selectivity comprises a probability of a record being found in one of the table of the database by the first operator prior to execution of the second operator. 18. The apparatus of claim 16 , wherein computing the query execution plan further comprises partitioning the table with the highest accumulated processing cost into a number of pieces determined by a number of symmetric computing resources available in the apparatus. 19. The apparatus of claim 18 , wherein computing the query execution plan comprises partitioning a second table having an accumulated processing cost that is less than the highest accumulated processing cost into fewer pieces than the number of pieces into which the table with the highest accumulated processing cost in partitioned. 20. The apparatus of claim 16 , wherein computing the query execution plan further comprises determining a sequence of operators for execution in parallel to perform the query on the database.

Assignees

Inventors

Classifications

  • Query optimisation · CPC title

  • Run-time optimisation · CPC title

  • Database tuning (G06F16/2282 takes precedence; database performance monitoring G06F11/3409) · CPC title

  • Access plan code generation and invalidation; Reuse of access plans · CPC title

  • Selectivity estimation or determination · CPC title

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 US10019478B2 cover?
A method that comprises receiving a logical execution plan for a database query corresponding to a plurality of tables of the database, wherein the logical execution plan comprises one or more operators, receiving an operator cost for each of the operators in the logical execution plan, computing a first accumulated processing cost for a first of the tables based on the logical execution plan, …
Who is the assignee on this patent?
Futurewei Technologies Inc
What technology area does this patent fall under?
Primary CPC classification G06F16/2453. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jul 10 2018 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 4 related publications on this page (citations in our corpus or others sharing the same primary CPC).