-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Document MV GRACE PERIOD clause #15810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
d62ab47
b975033
c265175
630baf3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ Synopsis | |
|
|
||
| CREATE [ OR REPLACE ] MATERIALIZED VIEW | ||
| [ IF NOT EXISTS ] view_name | ||
| [ GRACE PERIOD interval ] | ||
| [ COMMENT string ] | ||
| [ WITH properties ] | ||
| AS query | ||
|
|
@@ -29,16 +30,19 @@ materialized views, as compared to each time of accessing the view. Multiple | |
| reads of view data over time, or by multiple users, all trigger repeated | ||
| processing. This is avoided for materialized views. | ||
|
|
||
| When the underlying data changes, the materialized view becomes out of sync with | ||
| the source tables. Update the data in the materialized view with the | ||
| :doc:`refresh-materialized-view` statement. | ||
|
|
||
| The optional ``OR REPLACE`` clause causes the materialized view to be replaced | ||
| if it already exists rather than raising an error. | ||
|
|
||
| The optional ``IF NOT EXISTS`` clause causes the materialized view only to be | ||
| created or replaced if it does not exist yet. | ||
|
|
||
| The optional ``GRACE PERIOD`` clause specified how long the query materialization | ||
| should be used for querying. If time elapsed since last materialized view refresh | ||
findepi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| is greater than the grace period, the materialized view acts as a normal view and | ||
| materialized data is not used. If not specified, the grace period defaults to | ||
findepi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| infinity. See :doc:`refresh-materialized-view` for more about refreshing | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re "defaults to infinity". We should clarify what that means in practice. Something like that: As a result a materialized by default therefore without the specified grace period always uses the materialized data from the last refresh and never falls back to act like a view and retrieve the current data from the source tables.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for pointing this out. Ideally, can you please make it a suggestion, or somehow else indicate which piece of text you would want to have replaced with the new sentence(s)?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah .. I was struggling putting something together. How about this? After "inifinity." insert this: I know this is long but I feel like this is the only way to truly explain what is and is not happening. Maybe @colebow can chime in and refine my wording some more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @findepi did you forget to pull the above suggestion in? |
||
| materialized views. | ||
|
|
||
| The optional ``COMMENT`` clause causes a ``string`` comment to be stored with | ||
| the metadata about the materialized view. The comment is displayed with the | ||
| :doc:`show-create-materialized-view` statement and is available in the table | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.