Oracle materialized view syntax

Source: Internet
Author: User
Tags oracle materialized view
Code
Create materialized view [view_name]
Refresh [Fast | complete | force]
[
On [commit | demand] |
Start with (start_time) Next (next_time)
]
As
{Query statements for creating materialized views}

 

These are common syntaxes used to create a materialized view (materialized view) in Oracle. The meanings of parameters are as follows:

1. Refresh [Fast | complete | force] view refresh method:
Fast: Incremental refresh. assume that the previous refresh time is T1. When you use the fast mode to refresh the materialized view, only the data that has changed from T1 to the current time period is added to the view. to record this change, a materialized view log table is also required to create an incremental refresh materialized view. Create materialized view log on (primary table name ).
Complete: refresh all. It is equivalent to executing a query statement to create a view again.
Force: This is the default data refresh method. When the fast mode is available, data is refreshed in the fast mode; otherwise, the complete mode is used.

2. Mv data refresh time:
On Demand: refresh the data when the user needs to refresh. Here, the user is required to refresh the data manually (or use the job to refresh regularly)
On commit: when data is submitted in the master table, the data in the MV is refreshed immediately;
Start ...... : Refresh Every time (specified by next) from the specified time;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.