Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: slow performance in query a view

Re: slow performance in query a view

From: G M <zlmei_at_hotmail.com>
Date: 19 Sep 2003 20:07:11 -0700
Message-ID: <50a5e6b6.0309191907.195c9372@posting.google.com>


Look at explain plans for the two queries:

select emp_no from v_emp group by emp_no

and

 select emp_no from test group by emp_no;

to see if there is any difference.

HTH. Guang

"Chong Pok" <chongpok18_at_hotmail.com> wrote in message news:<3f698bf0$1_at_shknews01>...
> 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 Fri Sep 19 2003 - 22:07:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US