Patent ID: 7275055

Claim:
A method for managing creation of aggregation data structures for tables of a database, comprising: receiving an aggregation query specifying at least one aggregation operation on data of a table of the database; determining aggregation information for the aggregation query, the aggregation information describing aspects of the aggregation query and its respective aggregation operation; determining an estimated savings achieved by executing the aggregation query against the aggregation data structure, as opposed to executing the aggregation query against the table of the database: estimating a maintenance cost for the aggregation data structure; comparing the maintenance cost with the estimated savings; only if the maintenance cost does not exceed the estimated savings, creating an aggregation data structure for the table of the database in a manner allowing return of aggregation data of the created aggregation data structure upon receipt of a suitable aggregation query without executing the suitable aggregation query against the table of the database, wherein the suitable aggregation query includes the aggregation operation contained in the aggregation query for which the aggregation data structure was created; and if the maintenance cost exceeds the estimated savings, executing the suitable aggregation query against the table of the database.