Subject Re: [Firebird-Java] Re: Problem with SELECT Statement
Author Stephen Searfoss
Roman,

Since there is no standard on this issue let me
put in my two cents worth.

1) For a "select" statement it seems that commit
and rollback don't have any relevance since a select
statement does not change the database in any way.
Have I missed something here?

Likewise there should be no difference between
doing a select with autocommit true or false.

2) When autocommit is false, then you don't read
all the data over to the client. It seems that
whatever problems or limitations this would have with
autocommit is true should be the same with autocommit
as false. Again because the select is not going to
change anything anyway.

3) One of the advantages of a client / server
setup is that the client does not have to read all of
the data which reduces the traffic on the network.
True here you requested the select data, but how often
does the user then decide he does not need all of that
data.

4) Interbase is a lot better at holding all of
this data than Java is. Jaybird being in Java, shares
(or takes away) the same memory the Java program is
using.

We have adjusted our program to do all selects
with autocommit = false. Is it important to commit
before closing the statements? Or will closing the
statements free all the resources in Jaybird and
Interbase?

By the way we like Jaybird a lot more than
Interclient.

Stephen Searfoss


--- Roman Rokytskyy <rrokytskyy@...> wrote:
> > This is just an unfortunately the way the driver
> implements auto
> > commit mode - I don't know exactly why but it was
> necessary (at
> > least as far as anyone could see) to do this to
> implement
> > auto-commit with firebird.
>
> Reason for this is that server supports auto-commit
> mode using commit
> retaining (what this is you can read in
> documentation and ask in
> Firebird-Support group). Unfortunatelly commit
> retaining might inhibit
> garbage collection and after some point will cause
> an error "maximum
> number of savepoints exceeded". So, fetching all
> data to the client
> seemed for us the only option to implement
> auto-commit mode cleanly.
>
> There might be clever solution, so volunteers
> welcome.
>
> You should not rely on the fact that result set will
> be cached on the
> client. This is not specified in the standard and
> most likely no other
> driver do this.
>
> Best regards,
> Roman Rokytskyy
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com