Patent ID: 7877376
Filing Date: 2011-01-25
Classification: G06F

Abstract:
1. A computer-implemented method for rewriting queries, the method comprising: storing a plurality of materialized views, wherein a definition of each materialized view of the plurality of materialized views includes a set of aggregate expressions, and wherein storing said each materialized view comprises: storing the set of disjunct trees in computer data storage; receiving a query that requests particular aggregated data, wherein the query comprises an aggregate expression that specifies how the particular aggregated data is to be computed; identifying second one or more disjuncts in the aggregate expression; generating, based on the second one or more disjuncts, a disjunct tree that represents the aggregate expression; based on the disjunct tree and on the set of disjunct trees associated with said each materialized view of the plurality of materialized views, determining a particular materialized view from the plurality of materialized views that stores the particular aggregated data specified by the aggregate expression; and rewriting the query into an equivalent query that references the particular materialized view, wherein the equivalent query when executed would retrieve the particular aggregated data from the particular materialized view; wherein the method is performed by one or more computing devices.