Reputation: 369
In an application with Oracle materialized views I am curious about data availability during a refresh.
I will describe a potential example.
A materialized view is created that refreshes every hour on the hour. The query takes 1 minute to run to refresh this view. In the meantime a set of APIs use this view to retrieve data and could potentially write to an underlying table if that makes a difference.
My questions are as follows:
Upvotes: 2
Views: 1680
Reputation: 231661
The rules for what data queries see in a materialized view are identical to the rules that apply to what data queries see in a table that is undergoing changes. Those rules are summed up in the documentation under multiversion read consistency.
I will assume that you are doing an atomic refresh of the materialized view. You could do a non-atomic refresh which would truncate the materialized view before refreshing but that is almost certainly not what you'd want in this case.
Upvotes: 4