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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Performance of the "Select distinct"

Re: Performance of the "Select distinct"

From: <mgogala_at_rocketmail.com>
Date: Sun, 06 Dec 1998 18:39:21 GMT
Message-ID: <74ej0p$pih$1@nnrp1.dejanews.com>


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

Original text of this message

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