Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Page by Page iterator does not solve DB bottlenecks?

 
Jes Sie
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear people,
I've come across several implementation of Page-by-Page Iterators. OK, the one mentioned in J2EE Core patterns does solve some problems, but I think the best implementation not only iterate in memory but on the DB access level.
Most real project implementation that I see retrieves all the rows required and then sort them out in memory. But, this doesn't make sense if you've got 1000s of rows and user decides to view only the first 2 rows.
Tell me am I making sense.
Please take a look at the latest EJB sample from Oracle. (http://technet.oracle.com/sample_code/tutorials/fbs/over/reqsw.htm#DownloadSource) Specifically look at these java implementation: -
oracle.otnsamples.ibfbs.trademanagement.ejb.TradeManagementSessionFacadeBean.getPortfolio(...)
oracle.otnsamples.ibfbs.trademanagement.ejb.PageByPage.java

Example performance issue user input: -
If the Account User has 100 Portfolios, but only intested in viewing the first Portfolio on a page of size 5....don't you feel this sort of common Page-by-Page iteration do not solve the performance problem entirely?
Thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!