Re: Swing JTable and ResultSet TableModel (with big resultsets)

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: Swing JTable and ResultSet TableModel (with big resultsets)
Дата
Msg-id DAE038A9-FD2F-4A6C-9C8F-0825366C8D17@pgedit.com
обсуждение исходный текст
Ответ на Swing JTable and ResultSet TableModel (with big resultsets)  ("Stefano B." <stefano.bonnin@comai.to>)
Список 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 по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: CUBE, ROLLUP, GROUPING SETS?
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: pg_autovacuum / pg_class