This week's book giveaway is in the Testing forum. We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line! See this thread for details.
Page by Page iterator does not solve DB bottlenecks?
posted 13 years ago
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.