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: Why DISTINCT is costly?

Re: Why DISTINCT is costly?

From: <juhunu_at_gmail.com>
Date: 13 Sep 2005 02:06:28 -0700
Message-ID: <1126602388.479068.225160@g43g2000cwa.googlegroups.com>


Thanks for your responses

So there is no way to tweak to the performance with the DISTINCT, right?
We should either use it with the cost mentioned or restructure the query in way which doesn't need a distinct.

I would prefer going with the second option.

I have tried few queries by using the group by instead of DISTINCT and i found that the cost is getting doubled by doing so. Hence group by is helpless here.

Noons :-
You have mentioned in you post something like

"If the group by
list is smaller than the select list, you have a need to sort a lot less bytes."

But we cannont have the columns in select which are not part of group by. I believe that we can only have the columns mentioned in the group by or the group fundtions of the same. So we cannot have more columns in the select than the ones in group by.

Correct me If I am wrong Received on Tue Sep 13 2005 - 04:06:28 CDT

Original text of this message

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