Re: Handling large record sets in JDBC/web app
From: Charles Fineman (cfineman-no&spam_at_yahoo.com)
Date: 03/24/04
- Previous message: Ranbato: "Re: Recommendations on SQL Server JDBC driver?"
- In reply to: JLParke: "Handling large record sets in JDBC/web app"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 24 Mar 2004 11:25:07 -0500
I've used these two previously:
1) Use a temp table
You mentioned this. It's a fine solution but, of course, you need to
worry about clearing it out. I won't get into the various techniques
you can use to clear cruft out.
2) Use randomly addressable ResultSet and a "look ahead" paginator
I wrote a class that knew about pagination. Client code would request
a specific page. The class would keep N pages of data in memory. If it
had to it would re-run the query, move to the correct row in the result
set, and re-fill it's cache before returning. This would be stored in a
servlet session.
With #1 you get a snapshot of the data... obviously #2 will have "odd"
behavior if the source tables are changing between fills of the cache.
You can, of course, combine #1 and #2.
- Previous message: Ranbato: "Re: Recommendations on SQL Server JDBC driver?"
- In reply to: JLParke: "Handling large record sets in JDBC/web app"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|