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: ORDER BY question

Re: ORDER BY question

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 08 Dec 2006 08:00:53 -0800
Message-ID: <1165593640.257240@bubbleator.drizzle.com>


baoqinye_at_gmail.com wrote:
> The architecture group of our company has told us to avoid using ORDER
> BY in our queries. Their reasons are:
>
> - In 10G, order by is incredibly inconsistent. They had an example with
> only 2 rows of data that was extremely slow. Even if it looks like it
> works alright, it's not guaranteed to, and we can't predict when
> it'll fail. That instability is one of the main reasons against it.
>
> - ORDER BY a primary key, especially when the primary key is not used
> in the where clause, has the worst performance and is definitely to be
> avoided.
>
> Is this true?

Complete and total rubbish.

Any statement such as they made ... not backed up with a 10053 trace is just personal opinion.

ORDER BY is expensive ... but "expensive" is a relative term. As others have said ... get the metrics.

And if ORDER BY is ever the issue then look into implementing SORTED HASH CLUSTERS.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Dec 08 2006 - 10:00:53 CST

Original text of this message

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