pooja74
asked on
Views Creation
Please write me the steps to create the materilized views.I have five views to be created as materilized views.I want to place them in DBMS_REFRESH to get refreshed together.
I want to do refresh of views in every two hours.
Thx in advance.
I want to do refresh of views in every two hours.
Thx in advance.
ASKER
Thx for the reply ,But please include the syntax also the clause for refresh of the view in every two hours also.
Thx
Thx
The syntax is:
Create materialized view [view name]
refresh fast next sysdate + 1/12
as
select ...
from ...
where ...
this will do a fast refresh every two H`s, starting from two H`s after view creation.
Create materialized view [view name]
refresh fast next sysdate + 1/12
as
select ...
from ...
where ...
this will do a fast refresh every two H`s, starting from two H`s after view creation.
ASKER
Thx please send me the syntax for creation of group in dbms_refresh and using dbms_refesh for the group.And when we are using dbms_refresh we should use use refresh fast next sysdate + 1/12 in view or not.And if we not using then what is the syntax for creation of materilaized view with dbms_refresh.
This is urgent please reply.
Thx in advance.,
This is urgent please reply.
Thx in advance.,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is it the DBMS_REFRESH package that you need help on? If not could you be more specific about what you want, and I can perhaps give you the SQL.
CREATE MATERIALIZED VIEW sales_mv
BUILD IMMEDIATE
REFRESH COMPLETE ON DEMAND
AS SELECT t.calendar_year, p.prod_id,
SUM(s.amount_sold) AS sum_sales
FROM times t, products p, sales s
WHERE t.time_id = s.time_id AND p.prod_id = s.prod_id
GROUP BY t.calendar_year, p.prod_id;