The Artima Developer Community
Sponsored Link

Java Answers Forum
JDBC - Problem For Large Result Sets

1 reply on 1 page. Most recent reply: Feb 3, 2004 5:35 AM by Birendar S Waldiya

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Sanjay

Posts: 1
Nickname: sahabji
Registered: Feb, 2004

JDBC - Problem For Large Result Sets Posted: Feb 2, 2004 11:37 PM
Reply to this message Reply
Advertisement
I am working with database where there can be potentially large amount of data. But I am using page-by-page design pattern on GUI to show the records. This means I am showing 100 records per page on GUI. The user then presses next and I show him the next page. The problem I am facing is that when I traverse the resultset , it caches all the rows as it goes ahead. So at one point of time I can potentially be out of memory. Also I have to give the user facility of going to the last page of the data. This means that I may user resultset.last() which traverses the complete resultset. Can anyone help me to know whether it is possible in some way to discard the data that I have already traversed in the resultset so that I can never exhaust my heap.


Birendar S Waldiya

Posts: 21
Nickname: ebiren
Registered: Nov, 2003

Re: JDBC - Problem For Large Result Sets Posted: Feb 3, 2004 5:35 AM
Reply to this message Reply
> I am working with database where there can be potentially
> large amount of data. But I am using page-by-page design
> pattern on GUI to show the records. This means I am
> showing 100 records per page on GUI. The user then presses
> next and I show him the next page. The problem I am facing
> is that when I traverse the resultset , it caches all the
> rows as it goes ahead. So at one point of time I can
> potentially be out of memory. Also I have to give the user
> facility of going to the last page of the data. This means
> that I may user resultset.last() which traverses the
> complete resultset. Can anyone help me to know whether it
> is possible in some way to discard the data that I have
> already traversed in the resultset so that I can never
> exhaust my heap.

I think you can use Scrollable ResultSet that has an option to point the cursur to a particular point and scroll rear and front .
did u cheched that ?

Flat View: This topic has 1 reply on 1 page
Topic: Why it behaves differently? Previous Topic   Next Topic Topic: Clear MS-DOS screen

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use