Subject Re: [Firebird-Java] JayBird JDBC cursor implementation
Author Roman Rokytskyy
> I am fighting against excessive memory usage in my FB/Jaybird app, and
> I was evaluating the cursor feature of Jaybird.
> Is it possible _not_ to retrieve ALL the records in a SELECT query
> from the server to the client and to fetch them, let's say, 100 at a
> time, thus occupying only the memory needed for the 100 records?
> The docs seem to state that even if JDBC required the feature, it is
> currently not working or has limited benefit...
> Any suggestions/clarifications?

The fetch size is not working for auto-commit case and works perfectly when
the autocommit is truned off. The only issue in JayBird 1.5.5 is that you
have to specify the fetch size in Statement, the one specified in ResultSet
is ignored. JayBird 2.0 fixes both issues.

The positioned updates (Statement.setCursorName) feature works in
non-autocommit mode only and fetches only one record at a time regardless of
what fetch size you specify - that is implementation specifics.

Roman