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: sql query problem related to rownum. please help

Re: sql query problem related to rownum. please help

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Tue, 22 Feb 2005 21:50:21 -0800
Message-ID: <Z8CdnW4lDOodhIHfRVn-pA@comcast.com>

"techimadhu" <madhusudan.hv_at_gmail.com> wrote in message news:1109137397.425877.132010_at_o13g2000cwo.googlegroups.com...
> i need to do a top-n query after doing a sorting using order by. the
> query i am using is as below
>
> select * from
> (select * from table
> order by colA,colB)
> where rownum < 100
>
> i am having almost 1 lakh records in the table and because of the two
> levels of the query it is taking lot of time.
> i want to know is there any better way of achieving this like doing it
> in single query or something.
>

Try to use terminology that is more universally understood instead of highly regional ones.
Jim Received on Tue Feb 22 2005 - 23:50:21 CST

Original text of this message

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