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:
- 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;
aggregating records derived from the partial pre-aggregation to provide a result that contains records having unique grouping column values; and
estimating the costs and benefits of the partial pre-aggregation, and partially pre-aggregating the records only if the estimating indicates that the benefits are greater than the costs.
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.
-
Citations
10 Claims
-
1. One or more computer-readable media comprising computer-executable instructions for processing a database query, the computer-executable instructions comprising instructions for:
-
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;
aggregating records derived from the partial pre-aggregation to provide a result that contains records having unique grouping column values; and
estimating the costs and benefits of the partial pre-aggregation, and partially pre-aggregating the records only if the estimating indicates that the benefits are greater than the costs. - 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 for receiving a stream of input 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;
means for joining records in the record store with other data;
means for aggregating the records output from the join;
means for determining if it is optimal to aggregate the input records prior to performing the join; and
means for performing the aggregation prior to the join only if a determination is made that it is optimal to perform an aggregation prior to the join;
wherein the records output from the join include at least two records that have an identical grouping column value in the single grouping column; and
- View Dependent Claims (10)
-
Specification