Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: complete refresh of large materialized view, online or any alternatives?
"Hendrik Lampert" <henhouse_at_gmx.net> wrote in message news:<bf5vm3$5c9$02$1_at_news.t-online.com>...
> hi,
>
> using dbms_snapshot.refresh ('mview', 'C') takes about half an hour to
> complete. During that procedure the table is empty. The refresh runs every
> day in the morning when users would like to query the table.
>
> Are the any solutions to get the materialized view refreshed online
> without having the table empty?
>
> many thanks
> hendrik
Nope. You can not even use online redefinition on the MV base table. Possibly you can reduce the downtime by this:
1. Create a temp table that stores the complete up-to-date data set. 2. Notify users the table will be offlined for a short while. 3. Drop the old MV. 4. Rename the temp table to the MV name. 5. Create the new MV with the prebuilt table option.