Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Can I use a Mat. View Like this ?
8.1.7.4/OLTP system
UPDATE my_gtt --<-- Global Temp Table
SET c20 = calc_pkg.func20(tranx_id), c21 = calc_pkg.func21(tranx_id), c22 = calc_pkg.func22(tranx_id), c23 = calc_pkg.func23(tranx_id), c24 = calc_pkg.func24(tranx_id), c25 = calc_pkg.func25(tranx_id), c26 = calc_pkg.func26(tranx_id), ............
where those SQL functions look up several other tables. - SLOW but boss insists calc functions be maintained.
Can I create MV like this :
1)
create mat. view mv_pre_calc
as
select
tranx_id,
calc_pkg.func20(tranx_id) l_c21, calc_pkg.func21(tranx_id) l_c22, calc_pkg.func22(tranx_id) l_c23, calc_pkg.func23(tranx_id) l_c24, calc_pkg.func24(tranx_id) l_c25, calc_pkg.func25(tranx_id) l_c26, calc_pkg.func26(tranx_id) l_c27
2) create an PK/unique index on mv_pre_calc.tranx_id 3) Use this MV DIRECTLY to do correlated-update in my process above ?
thanks
robert
Received on Wed Dec 08 2004 - 10:05:05 CST
![]() |
![]() |