Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Pagination question
Hi All,
I have one question about pagination.
The following are the sql.
select * from (SELECT
B1PERMIT.B1_PER_ID1, B1PERMIT.B1_PER_ID2, B1PERMIT.B1_PER_ID3
FROM B1PERMIT, b3addres
WHERE B1PERMIT.SERV_PROV_CODE = 'NOLA'
AND B1PERMIT.REC_STATUS = 'A'
and B3ADDRES.SERV_PROV_CODE = 'NOLA'
AND B1PERMIT.SERV_PROV_CODE = B3ADDRES.SERV_PROV_CODE AND B1PERMIT.B1_PER_ID1 = B3ADDRES.B1_PER_ID1 AND B1PERMIT.B1_PER_ID2 = B3ADDRES.B1_PER_ID2 AND B1PERMIT.B1_PER_ID3 = B3ADDRES.B1_PER_ID3 AND B1PERMIT.REC_STATUS = B3ADDRES.REC_STATUSAND B3ADDRES.B1_SITUS_ZIP like '0%'
I want to return the first 100 rows.
The oracle version is 9.2.0.7
The following are the 10046 event trace file.
STAT #1 id=1 cnt=99 pid=0 pos=1 obj=0 op='COUNT STOPKEY ' STAT #1 id=2 cnt=99 pid=1 pos=1 obj=0 op='VIEW ' STAT #1 id=3 cnt=99 pid=2 pos=1 obj=0 op='SORT ORDER BY STOPKEY ' STAT #1 id=4 cnt=44836 pid=3 pos=1 obj=0 op='NESTED LOOPS ' STAT #1 id=5 cnt=44836 pid=4 pos=1 obj=34861 op='TABLE ACCESS BY INDEXROWID B3ADDRES '
Can anyone give some suggestion how to tune the sql?
Thanks
Jacky
Received on Fri Apr 21 2006 - 04:59:56 CDT