Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Preventing apex from fetching all rows of a sql statement

danielhNov 22 2012 — edited Nov 25 2012
Hi all,

we have a apex site with an interactive report, that fetches 20000 rows. rows per page is adjusted to 25 rows. But apex always fetches the complete 20000 rows though only 25 rows are displayed. so our statement takes a long time (up to 2 mins) to complete and only 25 results are there. i be aware of the max_row_count feature but we have a need that all results are displayed.
is there a possibility that apex fetches first 25 results, after pagination the next 25 and so on, but not all on the first page?
the only trick i can remember is to wright the ROWNUM directly in the sql statement, but this "trick" isn“t the most beautiful solution...
seeing:
SELECT *
  FROM (SELECT rownum,
               emp.lastname
          FROM emp
         WHERE emp.empno BETWEEN 1 AND 100
         ORDER BY  emp.lastname)
 WHERE rownum <= 5
thanks for your help!

- daniel

Edited by: danielh on 22.11.2012 07:22

Edited by: danielh on 22.11.2012 07:23

Edited by: danielh on 22.11.2012 07:26
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 23 2012
Added on Nov 22 2012
14 comments
1,864 views