65sql> DROP DATABASE LINK test2_new;The database link has been deleted.Sql> DROP materialized VIEW mv_test2;The materialized view has been deleted.Sql> SELECT OWNER, NAME, Mview_site, mview_id2 from [Email=user_registered_mviews@
, the limitations of the fast refresh of the three materialized views are very different, while others are not very significant.
http://baike.baidu.com/view/3208435.htm
My understanding is a view of the data stored in the table, he is only nominally called the view, in fact, the effect of the ordinary table is
PRODUCTS_MV REFRESH FAST on COMMIT as SELECT SUM (List_price-min_price), category_id from Product_information GROUP by category_id;
materialized view examples :This gives an example of materialized views that can be updated quickly and in a timely manner, which is relatively simple.Example 1: A fast refresh materialize
materialized view with a full refresh. If you choose force Mode, Oracle will determine whether it can be refreshed quickly, or if it can be fast, or else complete. Never refers to materialized views without any refreshes. For a materialized view that has already been create
.
Each view must specify the refresh method (f, incremental refresh, c, full refresh ,? , Force refresh ).
2. After the log and materialized view are created on the current day, delete the log and recreate the materialized
log volume and compare select. name, B. value, to_char (B. value- V, '000000') diff from v $ statname a, v $ mystat B where. statistic # = B. statistic # and. name = 'redo size'; -- value: 166458592 -- diff: 127564216, with an increase of about 121 M, the index impact is still relatively large. -- Clear drop materialized vie
, or use "," to REFRESH the materialized view since it is connected. As follows:
Create or replace procdure P_MVIEW_REFRESH
BEGIN
DBMS_MVIEW.REFRESH ('gg _ ZLX_ZHU ', 'F ');
END P_MVIEW_REFRESH;
Or use
Create or replace procdure P_MVIEW_REFRESH
BEGIN
DBMS_MVIEW.REFRESH ('gg _ ZLX_ZHU, GG_ZLX_FU ', 'ff ');
END P_MVIEW_REFRESH;
Note:
1. If you need to refresh multiple mat
. This is evidenced by the query results of user_segment;
Parameters related to materialized views:
COMPATIBLE must be later than 8.1.0
QUERY_REWRITE_ENABLED = TRUE enable query rewriting (default
QUERY_REWRITE_INTEGRITY =
ENFORCED-only restrictions and rules ENFORCED and guaranteed by Oracle are used for query (default );
TRUSTED-in addition to Oracle's mandatory and guaranteed constraints and rules, the query can also be rewritten using any relatio
');
END P_mview_refresh;
Attention: 1. If you need to refresh multiple materialized views at the same time, you must concatenate each materialized view name with a comma and Each view indicates the refresh mode (f, incremental refresh, C, full refresh, or forced refresh). 2,
materialized views at the same time, you must concatenate each materialized view name with a comma and Each view indicates the refresh mode (f, incremental refresh, C, full refresh, or forced refresh).2, log and materialized
First, Oracle materialized view syntaxCreate materialized view [view_name]Refresh [Fast|complete|force][On [Commit|demand] | Start with (start_time) next (next_time)]As{Create a query statement for materialized views}These are the syntax commonly used by Oracle to create
are created, delete the logs, you will need to re-create the materialized view, otherwise you cannot increment
Refresh.
3. Because the materialized view written above is updated according to the primary key, the primary table must have a primary key.
4, the above article red is replaceable, we can according to their o
Refresh FAST clause, you should create a materialized view log on the primary table, so when you create a materialized view with the FAST option, you must create a view log based on th
typically have primary keys, ROWID, and subquery views.
1. Primary key materialized view:
The following syntax creates a primary key materialized view on the Remote database table EMP
Sql> CREATE materialized VIEW MV_EMP_PK
NE
environments, the materialized views commonly created are primary key, rowid, and subquery materialized views.
Primary Key materialized views
The following statement creates the primary-key Materialized View on the table EMP located on a remote database.
SQL> CREATE
choose force Mode, Oracle will determine whether it can be refreshed quickly, or if it can be fast, or else complete. Never refers to materialized views without any refreshFor a materialized view that has already been created, you can modify its refresh mode, such as modifying the materialized
.
1. Primary Key Materialized View:
The following syntax creates a primary key Materialized View on the remote database table EMP.
SQL> Create materialized view mv_emp_pk
Refresh fast start with sysdate
Next sysdate more
defaults to force and demand.
Note: The materialized view that sets the refresh on commit does not have access to the remote object.
When you create a materialized view, you can specify an order by statement to keep the resulting data in a certain sequence. However, this statement is not written to the definition of
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.