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 -> pagination of oracle

pagination of oracle

From: lsllcm <lsllcm_at_gmail.com>
Date: 27 Mar 2006 07:28:05 -0800
Message-ID: <1143473285.526238.263760@v46g2000cwv.googlegroups.com>


Hi All,

I have one question about pagination of oracle.

The following is the example from asktom site.

   select p.*, rownum rnum

           from (select * from big_table order by id) p
          where rownum < 100

My question is that oracle do the order operation in inner query, then it returns first 100 rows.

If the sql engine think the inner query and outer query as a whole like star model. When it does order operation the inner query, it will stop when it get the first min 100 rows, it will stop to do order operation for other rows, it will save some time.

What do you think about?

Thanks
Jacky Received on Mon Mar 27 2006 - 09:28:05 CST

Original text of this message

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