Oracle Materialized View (entity view)

Source: Internet
Author: User
Tags oracle materialized view

Materialized views are similar to indexes in many aspects: materialized views are used to improve query performance, while materialized views are transparent to applications, adding or deleting materialized views does not affect the correctness and validity of SQL statements in applications. materialized views occupy storage space. materialized views should also be refreshed when the base table changes.

 

Creation method (Build Methods ):
The options include build immediate and build deferred. Build immediate generates data when you create a materialized view, while build deferred does not generate data when you create the view, and then generates data as needed. The default value is build immediate.

Query Rewrite ):
Including enable query rewrite and disable
Query
Rewrite. Specify whether the created materialized view supports query rewriting. Query Rewriting means that when you query the base table of the materialized view, Oracle automatically determines whether the materialized view can be queried.
To obtain the results. If possible, the clustering or join operation is avoided, and the data is directly read from the computed materialized view. The default value is disable query rewrite.

Refresh ):
When a DML operation is performed on the base table, the mode in which the materialized view is synchronized with the base table. The refresh modes include:
Two types: on demand and on commit. On
Demand indicates that the materialized view is refreshed when the user needs it. You can manually refresh the materialized view by using dbms_mview.refresh or other methods, or regularly refresh the view by job.
On
Commit indicates that the Materialized View refreshes the base table while submitting the DML operation. There are four refresh Methods: fast, complete, force, and Neve *. Fast Brush
New incremental refresh is adopted. Only modifications made since the last refresh are refreshed. Complete refresh completely refreshes the entire materialized view. If force mode is selected
Determines whether a quick Refresh can be performed. If yes, the FAST method is used; otherwise, the COMPLETE method is used. NEVER indicates that the materialized view is not refreshed. The default value is FORCE.
On demand.

 

You can use SQL developer to easily set various attributes of the object view.

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.