Cost-based maintenance of materialized views
First Claim
1. A method of incrementally maintaining a first materialized view of data in a database, the method employing an additional materialized view to maintain the first materialized view and the method comprising the steps of:
- determining whether a first cost of incrementally maintaining the first materialized view with the additional materialized view is less than a second cost of incrementally maintaining the first materialized view without the additional materialized view; and
creating the additional materialized view only if the first cost is less than the second cost.
1 Assignment
0 Petitions
Accused Products
Abstract
A method of incrementally maintaining a first materialized view of data in a database, by means of an additional materialized view, first determines whether a cost in time of incrementally maintaining the first materialized view with the additional materialized view is less than the cost of incrementally maintaining the first materialized view without the additional materialized view. The method creates the additional materialized view only if the cost in time is less therewith. Determining whether the cost of employing an additional materialized view is less includes using an expression directed acyclic graph that corresponds to the first materialized view. Another method of determining whether the cost is less includes pruning an expression directed acyclic graph to produce a single expression tree, and using the single expression tree to determine whether the cost is less. Both the expression directed acyclic graph and the single expression tree contain equivalence nodes. One or more possible materialized views are selected by marking the equivalence nodes, and materializing one or more views corresponding to the marked equivalence nodes. One or more possible materialized views are also selected by determining which of the views, if materialized, would result in a lowest cost of incrementally maintaining the first materialized view. The method is also used to reduce the cost in time of maintaining a first materialized view employed to check an integrity constraint of the database.
148 Citations
25 Claims
-
1. A method of incrementally maintaining a first materialized view of data in a database, the method employing an additional materialized view to maintain the first materialized view and the method comprising the steps of:
-
determining whether a first cost of incrementally maintaining the first materialized view with the additional materialized view is less than a second cost of incrementally maintaining the first materialized view without the additional materialized view; and creating the additional materialized view only if the first cost is less than the second cost. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A method for repeatedly executing an ad-hoc query in a database, the method employing a materialized view of data to execute the ad-hoc query, the method comprising the steps of:
-
determining whether a first query cost of repeatedly executing the ad-hoc query with the materialized view is less than a second query cost of repeatedly executing the ad-hoc query without the materialized view; and creating the materialized view only if the first query cost is less than the second query cost. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
-
Specification