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: how to tune up this query?

Re: how to tune up this query?

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Fri, 31 Jan 2003 00:27:34 +1000
Message-ID: <bt9_9.36755$jM5.93743@newsfeeds.bigpond.com>


"Ethel Aardvark" <bigjobbies_at_hotmail.com> wrote in message news:1a8fec49.0301300505.46e10f1b_at_posting.google.com...
> Susan,
> Without trying it, could this not be re-written as follows:
>
> SELECT id, name, priority FROM table_name
> WHERE stage = 'start' and state = 1
> AND rownum <= 1000
> ORDER BY stage ASC
>
> Remember that rownun is treated differently from other fields and will
> not be applied until AFTER the sort has taken place.
>

Hi Ethel,

True, but the sort as a result is potentially going to be one big mamma.

See my previous post why your code is less efficient than Susan's.

Cheers

Richard Received on Thu Jan 30 2003 - 08:27:34 CST

Original text of this message

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