Loading
Reading Huge Data Set

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  How do you query a huge table which has 1 million records in it?


Ans)

Consider a scenario where we have a huge database table with (say 1 million records),
and the requirement is to display those records in your application UI, how could we
do this.

The challenge in this is that Querying DB tables with huge set of records it will take more
time to iterate the records from DB and more over we get OutOfMemory error if we load
such a huge ResultSet into JVM memory.

To avoid these kind of issues, better set the ResultSet FetchSize to appropriate number
so that your JDBC Statement would fetch only that number of records.

 rs.setFetchSize(fetchSize);



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Reading Huge Data Set


Reading Huge Data Set

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free