The account to connect to.
The service name of the remote database (as found in the tnsnames.ora file for the
server). In this case, the service name is LOC.
Materialized views automate the data replication and refresh processes. When materialized
views are created, a refresh interval is established to schedule refreshes of replicated data. Local
?–
?–
?–
Chapter 8: Database Tuning 269
updates can be prevented, and transaction-based refreshes can be used. Transaction-based
refreshes, available for many types of materialized views, send from the master database only
those rows that have changed for the materialized view. This capability, described later in this
chapter, may significantly improve the performance of your refreshes.
The syntax used to create the materialized view on the local server is shown in the following
example, where the materialized view is given a name (LOCAL_EMP) and its storage parameters
are specified. Its base query is given as well as its refresh interval. In this case, the materialized
view is told to immediately retrieve the master data and then to perform the refresh operation
again in seven days (SYSDATE+7).
create materialized view LOCAL_EMP
pctfree 5
tablespace data_2
storage (initial 100K next 100K pctincrease 0)
refresh fast
start with SysDate
next SysDate+7
as select * from EMPLOYEE@HR_LINK;
The refresh fast clause tells the database to use a materialized view log to refresh the local
materialized view.
Pages:
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459