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: Pagination question

Re: Pagination question

From: lsllcm <lsllcm_at_gmail.com>
Date: 24 Apr 2006 00:22:43 -0700
Message-ID: <1145863363.300350.89240@y43g2000cwc.googlegroups.com>


Hi Steve,

The rownum usage for pagination is like the following sql.

select b.*
(Select * from A Order by A.Id) b
where rownum<100

The sql is from asktom site, it scan the index on table A column A.ID, and stops when it retrieves the first 100 rows.

But in issued sql, the sql now retrieve the index B3ADDRES_ZIP_IX at first, then use nest loop join table B1PERMIT, because the rows return from index B3ADDRES_ZIP_IX is 45326, then the nest loop needs more time, the same is when we use the hash join.

What do I want is the first 100 rows order by B1PERMIT.B1_FILE_DD and meet the search condition on B3ADDRESS.B1_SITUS_ZIP column.

Thanks
Jacky Received on Mon Apr 24 2006 - 02:22:43 CDT

Original text of this message

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