Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> pagination of oracle
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