Partial pre-aggregation in relational database queries
First Claim
1. One or more computer-readable media comprising computer-executable instructions for processing a database query, the computer-executable instructions comprising instructions for:
- estimating costs and benefits of a partial pre-aggregation, wherein an estimate of a number of records that would be output from the partial pre-aggregation is based on a formula having inputs comprising;
a memory space for group records, M;
a number of input records, N, N being greater than a number, D, of records after full aggregation; and
an absorption power term, wherein the absorption power term comprises a summation of D terms, each term including a probability of a record belonging in a group of records;
if indicated by the estimate, partially pre-aggregating records in a database according to a single grouping column to provide a result that contains at least two records having like grouping column values; and
aggregating records derived from the partial pre-aggregation to provide a result that contains records having unique grouping column values.
1 Assignment
0 Petitions
Accused Products
Abstract
A partial pre-aggregation database operation improves processing efficiency of database queries by reducing the number of records input into a subsequent database operation, provided the query includes a final aggregation. A query optimizer is provided to determine when it is economical to partially pre-aggregate data records and when it is not. The partial pre-aggregation creates a record store in memory as input records are received. The record store is then used by another database operator, which saves the other database operator from having to re-create the record store.
21 Citations
12 Claims
-
1. One or more computer-readable media comprising computer-executable instructions for processing a database query, the computer-executable instructions comprising instructions for:
-
estimating costs and benefits of a partial pre-aggregation, wherein an estimate of a number of records that would be output from the partial pre-aggregation is based on a formula having inputs comprising;
a memory space for group records, M;
a number of input records, N, N being greater than a number, D, of records after full aggregation; and
an absorption power term, wherein the absorption power term comprises a summation of D terms, each term including a probability of a record belonging in a group of records;if indicated by the estimate, partially pre-aggregating records in a database according to a single grouping column to provide a result that contains at least two records having like grouping column values; and aggregating records derived from the partial pre-aggregation to provide a result that contains records having unique grouping column values. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A relational database computer program stored on a computer-readable medium, the relational database computer program comprising:
-
means receiving a stream of input records; means for estimating costs and benefits of a partial pre-aggregation of records from the stream of input records and for performing the partial pre-aggregation if indicated, wherein an estimate of a number of records that would be output from the partial pre-aggregation is based on a formula having inputs comprising;
a memory space for group records, M;
a number of input records, N, N being greater than a number, D, of records after full aggregation; and
an absorption power term, wherein the absorption power term comprises a summation of D terms, each term including a probability of a record belonging in a group of records;means for aggregating the input records in the stream according to a single grouping column as it is received to create a record store; and means for joining records in the record store with other data; wherein the records output from the join include at least two records that have an identical grouping column value in the single grouping column. - View Dependent Claims (10)
-
-
11. A relational database computer program stored on a computer-readable medium, the relational database computer program comprising computer-executable instructions that, when executed on a computer, perform the following steps:
-
receiving a stream of input records; estimating costs and benefits of a partial pre-aggregation of records from the stream of input records and for performing the partial pre-aggregation if indicated, wherein an estimate of a number of records that would be output from the partial pre-aggregation is based on a formula having inputs comprising;
a memory space for group records, M;
a number of input records, N, N being greater than a number, D, of records after full aggregation and an absorption power term, wherein the absorption power term comprises a summation of D terms, each term including a probability of a record belonging in a group of records;aggregating the input records in the stream according to a single grouping column as it is received to create a record store; and joining records in the record store with other data; wherein the records output from the join include at least two records that have an identical grouping column value in the single grouping column. - View Dependent Claims (12)
-
Specification