Subject Re: Speed problem retrieving 50,000 rows...
Author phil_hhn
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:
> few entries from it? Then you better use SELECT FIRST x [SKIP y]
statement.
That may be an option....

> But if at the end you fetch the complete result locally, you will
have to
> spend that 2.0 seconds sooner or later. Or do I miss something?
True, the 2 seconds (or fetching x rows y times totalling [over] 2
seconds) must eventually be taken. So I guess it may be better for us
to retrieve the first few rows immediately then the remainder in a
background thread.
If the next version of the JDBC driver changes as you say, then we
can't leave the ResultSet open for long (it'll become invalid when we
do the next query) so that means we have to get the row data out of it
before doing something else.
But I wouldn't normally like to keep the ResultSet open for long
anyway ;-)

> No idea. Fetch size only tells driver how many isc_dsql_fetch calls
should
> be made to fill the internal buffer. You can set it to 1 and this will
> guarantee that isc_dsql_fetch will be called only once.
oops, have just seen in the ResultSet and Statement interfaces the
methods to set the fetch size... sorry about that question :-[