Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Get z record fast (from x to y records)

425035Sep 13 2007 — edited Sep 14 2007
Hello gurus,

I have table a containing around 7 milion records and trying to retrieve z record.
I have tried to this script

SELECT id, name
FROM
(
SELECT ROWNUM rn, id, name
FROM table_a
ORDER BY name
)
WHERE rn BETWEEN 5 to 10;

Already use index for the table and it retrieve fast if I start from rownum = 1.
And have tried using hints FIRST_ROWS but doesnt do any good.
Is there any way to make it faster?

Thank you so much
henry

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 11 2007
Added on Sep 13 2007
9 comments
2,720 views