Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Need to fetch large number or records from database

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I try to fetch 100000 rows from the database what will happen?
Is there is facility of lazy fetching ?
Is there any design pattern for this case ?
 
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suchitra, Welcome to JavaRanch.
Please change your name to comply with the naming policy to which you agreed when you registered.
You can change your name here:
here

You can also find the naming policy here:
http://www.javaranch.com/name.jsp
Thank You!
 
Suchitra Baliga
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
very sorry for that....
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There is a pattern over here. However this is to kind of cache the results and then show them page by page.
However I doubt if one would like to invoke a query that keeps that number of records in memory that you want.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There could be 2 options in here:
1. StateFull SessionBean methods return partial result, for example for every N records.
2. Using JMS Queue
Session bean method execute query, getting data from ResultSet and periodically sending result object to queue.
Regards,
Milind
 
Suchitra Baliga
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou.
 
I think I'll just lie down here for a second. And ponder this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic