Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> slow performance in query a view
I have created a view and try to execute a select + group by query of the
view. However, the performance is very slow.
select emp_no from v_emp group by emp_no
However, if I create a temp. table first and create an index. The
performance is far more better.
create table test as select emp_no from v_emp;
create index ix_test on test(emp_no);
select emp_no from test group by emp_no;
The total time is much shorter
I wonder whether Oracle can take advantage of the underlying table index of the view? What's the proper implementation in query such kind of view?
Many thanks Received on Thu Sep 18 2003 - 05:41:49 CDT