Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Paging-Query based

 
Atul Mishra
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

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 ?

Thanks,
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic