Subject Re: [IBO] Orphaned Statements
Author Aage Johansen
ulf_at_thgg wrote:
> we're using IBObjects in a fairly large project against Interbase and
> Firebird. We've been battling some performance issues for quite some
> time now.
> ...
> We discussed this with Interbase directly, and they explained that
> this situation occurs when a transaction is rolled back or committed
> before the associated statement handles are released. While
> admittedly this is something the server or the API should take care
> of, it is up to the application to keep track of open statement
> handles and to release them before releasing a transaction.

Do you _always_ prepare queries at each invocation (without ever unpreparing)?
What happens if you prepare each query once (just before first use)?
(Obviously this is only applicable with constant (parameterized) queries).
I try to "prepare just once" and let them stay that way for the duration of
the app, and I haven't observed any ill effects. But then, there's
probably less than 100 queries (components) in that app. Obviously, at any
commit many queries don't belong to any transaction (which should not be of
any significance). A prepared query can be repeatedly used in many
transactions - what did Borland/Interbase mean with "releasing handles
before releasing a transaction"?

Aage J.