Oracle物化视图

grant create materialized view,query rewrite to scott

set autotrace trace exp查看执行计划

show parameter

创建物化视图:

create materialized view mt
build immediate
refresh on demand
enable query rewrite
as
select d.deptno,d.dname,sum(e.sal)
from emp e,dept d
where e.deptno=d.deptno
group by d.deptno,d.dname;

exec dbms_mview.refresh('mt');
oracle执行计划

你可能感兴趣的:(oracle)