I have decided to implement query based paging for my huge report which can return large resultsets and now I need help with implementation.
In Oracle I learned about ROWNUM keyword. And I read articles about using ORDER BY DESC..
have anyone implemented this in Oracle ? If so, can you help ?
posted 9 years ago
I've used "select ... rownum() where rownum < nnn" in Oracle for this kind of thing. It's been years ... that's probably not exactly the right syntax. Today I had to learn "FETCH FIRST nnn ROWS ONLY" for DB2. ORDER BY might make the database engine fetch all rows and sort them before giving you the count you want so you may not save much.
Here are some notes from prior conversations about paging ...
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi