For details on the refresh capabilities of materialized views, see Chapter 17.
Regardless of the refresh option chosen, you should index the materialized view??™s base table
to optimize queries against the materialized view. From a performance perspective, your goal is
to present the users with the data they want in the format they want it as quickly as possible. By
creating materialized views on remote data, you can avoid traversing database links during
queries. By creating materialized views on local data, you can prevent users from repeatedly
aggregating large volumes of data, presenting them instead with pre-aggregated data that answers
their most common queries.
270 Oracle Database 11g DBA Handbook
Using Remote Procedure Calls
When using procedures in a distributed database environment, you can use one of two options:
to create a local procedure that references remote tables or to create a remote procedure that is
called by a local application.
The proper location for the procedure depends on the distribution of the data and the way the
data is to be used. The emphasis should be on minimizing the amount of data that must be sent
through the network in order to resolve the data request. The procedure should reside within the
database that contains most of the data used during the procedure??™s operations.
For example, consider this procedure:
create procedure MY_RAISE (My_Emp_No IN NUMBER, Raise IN NUMBER)
as begin
update EMPLOYEE@HR_LINK
set Salary = Salary+Raise
where Empno = My_Emp_No;
end;
In this case, the procedure only accesses a single table (EMPLOYEE) on a remote node (as
indicated by the database link HR_LINK).
Pages:
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461