Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: GROUP BY disables indexes and parallel query
Dragon Fly wrote:
>
> Here is what I've got:
> SELECT A, B, C from MYTABLE WHERE A<=5 and B=9701;
> runs for 10 secs on 12-million row MYTABLE;
>
> But when I do
> SELECT A,B,COUNT(*) FROM MYTABLE WHERE A<=5 AND B=9701 GROUP BY A,B;
> runs for 20 mins.
>
> Looks like GROUP BY clause disables both indexes and parallel query on
> MYTABLE.
> Why is that and how to avoid it?
>
> Thanks,
> Sergei
Parllel query PQO cannot work on indexes. As far as Oracle7.3.2 you
cannot parallelize index scans. So if your using parallel query be sure
that it is always going to perform full table scans - and that is how
you should use it. If you are getting a good performance using indexes
then use indexes. Regarding GROUP BY disabling indexes, it is not clear
from what you have posted - Depends on what optimizer you're using,
whether or not the tables are analyzed etc. A thorough look at these
aspects might help.
Received on Sun Apr 13 1997 - 00:00:00 CDT
![]() |
![]() |