Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Performance of the "Select distinct"
In article <366a8c01.0_at_news2.ibm.net>,
"Nicolas Bronke" <NBronke_at_Trinity.de> wrote:
> As I know, the command "select distinct" is not very fast. I may get the
> same result using following syntax like
>
> select a,b,c, sum(0) from table
> group by a,d,c
>
> In addition I receive the result set in order of a,b,c.
>
> Is that faster?
> --
> Kind regards
> Nicolas Bronke
>
>
Both select statements use sort to group by or select distinct. If you need
such output, the only way would be to specify something like
alter table xxxx parallel(n);
where n is the number of CPUs you have. If you are using OS striping and
and SORT_AREA_SIZE setting is optimal, you can speed up the process
significantly.
--
Mladen Gogala
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sun Dec 06 1998 - 12:39:21 CST