Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Deadly sins againts database performance/scalability
On Fri, 28 Nov 2003 09:36:59 +0100, Cris Carampa <cris119_at_operamail.com> wrote:
>Marc Blum wrote:
>
>> (1)
>> SELECT DISTINCT ...
>
>Sorry for the naive question: what's wrong with SELECT DISTINCT?
>
>Kind regards,
DISTINCT requieres a sort. Unnecessary sorts are main reason fpr performance problems.
In 100% of the cases, where I stumbled about a SELECT DISTINCT, it was coded for one of these three reasons:
(1) the developer didn't understand the datamodel
(2) the developer didn't understand the requierements he was implementing
(3) the datamodel was inappropriate to the requierements
Over the last three or four years, no single DISTINCT survided, after I encountered it.
-- Marc Blum mailto:blumNOSPAM_at_marcblum.de http://www.marcblum.deReceived on Fri Nov 28 2003 - 10:40:02 CST