-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maintain materialized view data status.
A materialized view's data could be seen as up to date with base tables if there are no writable operations since last Refresh of the view. If one of base tables in the query tree of a materailied view is modified, the view data is not up to date. And we could not use it to answer query. This commit maintain the data satus of a materialized view and it applies to normal materialized view, IVM with defer refresh. IVM with immediately refresh is always up to date. When a base table has writable operation, we try to update view data status as: - 'u'(up to date): Create Materialized View Refresh - 'e'(expired): Update base tables Delete base tables Refresh With No Data Truncate base tables Create Materialized View With No Data - 'i'(insert only): Insert info base tables Copy From Copy From on Segments - 'r'(up to date but reorganized): Cluster base tables Vacuum Full base tables Insert, Update, Delete, Copy From operations take effect if the actual affected rows > 0, ex: insert into t1 select * from t2; We don't need to update view if t2 has zero rows. The real status will be decided both by current and the status we try to mark as.Ex: we try to mark insert only on a expired status, it will not success. This doesn't work on utility mode, if user modified data in that mode, should refresh views if want to use it to answer query. AQUMV could use normal materialized views after this commit. Authored-by: Zhang Mingli avamingli@gmail.com
- Loading branch information
Showing
34 changed files
with
1,700 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.