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

Home -> Community -> Usenet -> c.d.o.server -> Re: Deadly sins againts database performance/scalability

Re: Deadly sins againts database performance/scalability

From: Marc Blum <blumNOSPAM_at_marcblum.de>
Date: Fri, 28 Nov 2003 17:40:02 +0100
Message-ID: <d9uesvcfmmt0gr8ciqjpfve0sqlapukqe0@4ax.com>


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.de
Received on Fri Nov 28 2003 - 10:40:02 CST

Original text of this message

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