Patent ID: 7921103

Claim:
A computer-implemented method comprising: a hardware computer processor performing the steps comprising: selecting two or more particular fragments of two or more candidate materialized views by selecting fewer than all of the fragments of either of the two or more candidate materialized views; during a first time interval, storing the two or more particular fragments in one or more non-volatile computer readable storage mediums; wherein, throughout the first time interval, fragments of the two or more candidate materialized views other than the two or more particular fragments are not stored in any non-volatile computer readable storage medium as fragments of any materialized view; based on one or more statistics related to the two or more particular fragments, selecting one or more additional fragments that (a) are fragments of at least one of the two or more candidate materialized views and (b) during the first time interval, are not stored as fragments of any materialized view; during a second time interval, storing the one or more additional fragments in the one or more non-volatile computer readable storage mediums; based on the one or more statistics related to the two or more particular fragments, selecting at least one of the two or more particular fragments; and during the second time interval, removing the at least one particular fragment from the one or more non-volatile computer readable storage mediums, thereby causing the at least one particular fragment to cease to be stored as a fragment of any materialized view during the second time interval, wherein, a materialized view is a result set of a query that is stored in a persistent manner and consists of a plurality of fragments; wherein, a fragment is a subset of the rows of a materialized view.