Can some review my materialized view? [message #443810] |
Wed, 17 February 2010 06:58 |
pdaalder
Messages: 1 Registered: February 2010 Location: n/a
|
Junior Member |
|
|
Hi
I'm suggesting at my work to use a materialized view, instead of a process that have running daily. This process runs about 20min, yes some tuning needs to happen there. This process selects data, and inserts that into a table.
My idea is to create a materialized view that will be updated each day (or half day).
The way I've created the mview is:
create materialized view log on SOME_VIEW WITH ROWID;
create materialized view MV_TABLE
TABLESPACE <tblspace>
as SELECT a.col1,a.col2,b.col1,b.col2,a.col3
FROM SOME_TABLE A, SOME_VIEW B
WHERE A.COL1 = B.COL1
AND A.COL2 = (SELECT MAX(A1.COL2) FROM SOME_TABLE A1 WHERE A1.COl1 = A.COL1);
What i'm not sure about is, is this the way to setup this mview? Also I would like to use the refresh 'fast' mechanism, as I don't want loose the data in this view, but rather updated it with that latest changes. The goal of this to reduce processing time of refreshing the mview/table.
Any tips are much appreciated.
Peter Daalder
|
|
|
|