Re: Swing JTable and ResultSet TableModel (with big resultsets) - Mailing list pgsql-general

From John DeSoi
Subject Re: Swing JTable and ResultSet TableModel (with big resultsets)
Date
Msg-id DAE038A9-FD2F-4A6C-9C8F-0825366C8D17@pgedit.com
Whole thread Raw
In response to Swing JTable and ResultSet TableModel (with big resultsets)  ("Stefano B." <stefano.bonnin@comai.to>)
List pgsql-general
On Oct 27, 2006, at 5:29 AM, Stefano B. wrote:

> I have investigate about the possibility of load (in the client
> side) only a small subset of the resultset but with no luck. In the
> maling lists I see that the only way to load the resultset
> incrementally is to define a forward only resultset with autocommit
> off, and using setFetchSize(...). But this solution doesn't solve
> my problem because if the user scrolls the entire table, the whole
> resultset will be downloaded...

I don't use JDBC so maybe I don't understand the limitations. But
PostgreSQL supports cursors that can be scanned forward and
backwards. Using FETCH you can just get the data you need for the
display. See the DECLARE documentation:

http://www.postgresql.org/docs/8.1/interactive/sql-declare.html





John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: CUBE, ROLLUP, GROUPING SETS?
Next
From: Tomas Vondra
Date:
Subject: Re: pg_autovacuum / pg_class