Calculating aggregates of multiple combinations of a given set of columns
AssigneeTeradata US, Inc.
InventorAmbuj Shatdal
Life of this patent
Estimating the term…
Abstract
In a database system having processing units, a request is received to calculate aggregates of multiple combinations of a given set of columns. The processing units are divided into multiple groups, where each of the multiple groups includes a corresponding subset of the processing units. Within each of the groups, data of each processing unit in the group is replicated to other one or more processing units in the group. Within each of the groups, aggregates of at least some of the multiple combinations of the given set of columns are calculated by the processing units in the group using the replicated data.
Claims19
A method for use in a database system having a plurality of processing units, comprising:
- receiving a request to calculate aggregates of multiple column combinations of a given set of columns, wherein each aggregate is requested to be calculated from a respective column combination of the multiple column combinations;
- dividing the plurality of processing units into a number of groups, wherein each of the groups includes a respective subset of the processing units, and wherein the number of groups is based on a total number of the multiple column combinations of the given set of columns, a number of the plurality of processing units, and a size of cache memory per processing unit;
- determining a predetermined number of passes to calculate the aggregates by each of the groups, wherein the number is one or greater, wherein the predetermined number of passes is determined prior to calculation of the aggregates by each of the groups;
- within each of the groups, replicating data of each processing unit in the group to other one or more processing units in the group;
- and
- within each of the groups, calculating aggregates of at least some of the multiple column combinations of the given set of columns by the processing units in the group using the replicated data, wherein the processing units in each group are executable on one or more processors.
A database system, comprising:
- one or more processors;
- a plurality of processing units executable on the one or more processors;
- and
- the one or more processors configured to:
- receive a query that specifies calculation of aggregates of multiple column combinations of a given set of columns, wherein each aggregate is specified to be calculated from a respective column combination of the multiple column combinations;
- identify plural groups of the processing units, wherein each of the groups includes a respective subset of the processing units, and wherein the number of plural groups is based on a total number of the multiple column combinations of the given set of columns, a number of the plurality of processing units, and a size of cache memory per processing unit;
- determine a predetermined number of passes to calculate the aggregates by each of the groups, wherein the number is one or greater, wherein the predetermined number of passes is determined prior to calculation of the aggregates by each of the groups;
- within each of the plural groups, replicate data of each processing unit in the group to other one or more processing units in the group;
- and
- within each of the plural groups, calculate aggregates of at least some of the multiple column combinations of the given set of columns by the processing units in the group using the replicated data.
An article comprising at least one non-transitory computer-readable storage medium storing instructions that upon execution by one or more processors of a database system cause the database system to:
- receive a request to calculate aggregates of multiple combinations of a given set of columns, wherein each aggregate is requested to be calculated from a respective column combination of the multiple column combinations;
- identify plural groups of the processing units, wherein each of the groups includes a respective subset of the processing units, and wherein the number of plural groups is based on a total number of the multiple column combinations of the given set of columns, a number of the plurality of processing units, and a size of cache memory per processing unit;
- determine a predetermined number of passes to calculate the aggregates by each of the groups, wherein the number is one or greater, wherein the predetermined number of passes is determined prior to calculation of the aggregates by each of the groups;
- within each of the groups, replicate data of each processing unit in the group to other one or more processing units in the group;
- and
- within each of the groups, calculate aggregates of at least some of the multiple column combinations of the given set of columns by the processing units in the group using the replicated data.
Dependencies are inferred from the claim text.