| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Select Distinct (was top N or rewriting MAX)
In article <32DEC3C1.7393_at_rci.rogers.com>, AWILSON
<awilson_at_rci.rogers.com> writes
>Pardon my jumping in again,
>
>This raises a couple of interesting points.
>
>How does Select Distinct work - ie what mechanism does it use to ensure
>distinctness?
It sorts the results and then does a table scan of the sorted set
returning distinct rows. It may be able to use an index to achieve the
same result, but in either case the ordering of the result is an
accident.
>Can it be relied upon to work the same way in future?
>
The safe answer is no, but I can't think of any mechanisms which would
not result in a sorted set. Any clever computer science types out there
who know of ways to achieve this?
-- Jim SmithReceived on Sun Jan 19 1997 - 00:00:00 CST
![]() |
![]() |