CPC G06F 16/24539 (2019.01) [G06F 16/2282 (2019.01); G06F 16/24552 (2019.01); G06F 16/285 (2019.01)] | 17 Claims |
1. A method comprising:
identifying a materialized view comprising data from one or more base tables, a portion of the data of the materialized view comprising stale data removed from the one or more base tables;
performing, by at least one hardware processor, an integrated task within a maintenance operation on a database, the integrated task comprising:
compacting the materialized view by removing the stale data based on change data stored in a state cache of the database, the state cache recording file names of storage units that have been modified from the one or more base tables; and
clustering the compacted materialized view to group data based on a sorting key, the clustering comprising:
storing the compacted and clustered materialized view in a staging location, the staging location being a temporary location in the database;
performing at least one reclustering operation comprising processed data in the staging location; and
inserting the processed data from the staging location to reform the compacted and clustered materialized view; and
storing the compacted and clustered materialized view in the database in a manner that avoids one or more maintenance jobs by identifying non-equivalent data sets between the materialized view and the one or more base tables using the state cache, the storing the compacted and clustered materialized view in the staging location comprising avoiding scheduling materialized view maintenance while a clustering job for the one or more base tables is being performed.
|