Patent Document ID: 8037059
Application ID: 12113259

Base Claim:
1. A method for implementing aggregation combination using rollup depth lists for optimizing database query processing comprising: identifying grouping sets and combining multiple grouping sets into multiple single rollups; each grouping set including a collection of elements; assigning rollup depth lists defining the levels of grouping to be performed for each of said multiple single rollups; each said rollup depth list including respective element counts for each element; wherein identifying grouping sets and combining multiple grouping sets into multiple single rollups and assigning rollup depth lists includes: identifying a list of source groups; each source group including a collection of elements; identifying one source group, reading the source group, initially assigning each source group element a count of zero and assigning a last element a count of one; storing the source group within a target group list; identifying one target group, processing the stored source group and the identified target group in the target group list, such that the source group elements are sorted to match element order of target group elements; and combining the processed stored source group with the processed identified target group into a single rollup, wherein the element counts of the rollup depth list for said single rollup are determined based on said combining; generating an access plan utilizing said multiple single rollups; and said corresponding rollup depth lists; providing an execution engine executing a database query with said access plan; and said execution engine using respective element counts of each rollup depth list to identify how many times to perform each level of aggregation of elements within each of said multiple single rollups, optimizing database query processing.

---

Claim 6:
6. The method for implementing aggregation combination using rollup depth lists for optimizing database query processing as recited in claim 1 wherein executing the database query with said access plan includes collating values using a sorted temporary result, an index, a hierarchical hash table, or another collating mechanism to perform multi-stage aggregations.