Subject | Re: [firebird-support] Return SQL result in portions / progressively load result set |
---|---|
Author | Mark Rotteveel |
Post date | 2012-08-31T09:03:40Z |
On Fri, 31 Aug 2012 08:23:17 -0000, "williamevanw"
<williamevanw@...>
wrote:
statement.
http://www.firebirdsql.org/refdocs/langrefupd25-select.html#langrefupd25-select-rows
It has been a while since I used JTable, but I seem to recall that you
should be able to define events when it needs more rows and then query
those rows to update your TableModel. One thing you should take into
account however is that it is unwise (performance wise) to try to query the
total amount of rows beforehand (eg using SELECT COUNT(*)), as that is an
inefficient operation in Firebird.
Ideally you would want to use scrollable ResultSets for this, but that
will actually result in Jaybird loading all rows anyway.
Mark
<williamevanw@...>
wrote:
> Hi guys,displayed
>
> I have several database tables that can grow to contain more than a
> million records. These tables are loaded into a jTable and then
> to a user and sometimes take quite some time to load.it
>
> Is there a way to progressively load the resultset into the jtable? Do
> in sections so that the user sees the records are being loaded insteadof
> waiting?You should query what you need using the ROWS clause in your select
>
> I would imagine that this can be accomplished either by SQL or by an
> unknown feature or setting in the database..
>
> I don't know where to start looking..
>
> Any advice or guidance greatly appreciated..
statement.
http://www.firebirdsql.org/refdocs/langrefupd25-select.html#langrefupd25-select-rows
It has been a while since I used JTable, but I seem to recall that you
should be able to define events when it needs more rows and then query
those rows to update your TableModel. One thing you should take into
account however is that it is unwise (performance wise) to try to query the
total amount of rows beforehand (eg using SELECT COUNT(*)), as that is an
inefficient operation in Firebird.
Ideally you would want to use scrollable ResultSets for this, but that
will actually result in Jaybird loading all rows anyway.
Mark