×

Dynamic partition selection

  • US 10,509,783 B1
  • Filed: 04/17/2017
  • Issued: 12/17/2019
  • Est. Priority Date: 06/25/2014
  • Status: Active Grant
First Claim
Patent Images

1. A system comprising one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to perform operations comprising:

  • receiving a representation of a query plan generated for a query, the query plan comprising a first plurality of operators that, when executed by one or more computing nodes, cause the one or more computing nodes to compute a result for the query, wherein the first plurality of operators in the query plan includes a select operator and a dynamic scan operator, wherein the dynamic scan operator represents a first computing node obtaining tuples from a table that is partitioned into a plurality of partitions by a partitioning key and transferring the tuples to a second computing node that executes a parent operator of the dynamic scan operator;

    generating a partition selector operator corresponding to the dynamic scan operator, wherein the partition selector operator represents a third computing node that executes the partition selector operator including determining one or more partition identifiers of partitions of the table and transferring the one or more partition identifiers to the dynamic scan operator of the first computing node;

    determining a location in the query plan for the partition selector operator relative to the select operator, including;

    determining that the select operator includes a predicate expression on the partitioning key of the table;

    in response to determining that the select operator includes a predicate expression on the partitioning key of the table, annotating the partition selector operator with the predicate expression from the select operator; and

    pushing the partition selector operator to a child operator of the select operator; and

    generating a modified query plan having the partition selector operator at the determined location, wherein the modified query plan includes a second plurality of operators that, when executed by one or more computing nodes, cause the one or more computing nodes to compute a result for the query using the partition selector operator including determining, from the predicate expression and a partition selection function, one or more partitions of the table having a range of tuples on the partitioning key that satisfies the predicate expression.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×